@aphrody/m3-showcase 3.3.4
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/README.md +47 -0
- package/dist/Album-20-x0fyhqxj.png +0 -0
- package/dist/Album-txdjxr6p.png +0 -0
- package/dist/Album_Light-bnvn9x43.png +0 -0
- package/dist/Alias-20-jpvzp7sd.png +0 -0
- package/dist/Alias-fbqj79wp.png +0 -0
- package/dist/Alias_Light-hv5b8k7t.png +0 -0
- package/dist/AmazonS3-x58haer2.png +0 -0
- package/dist/AndroidPhotos-cj9z6mnt.png +0 -0
- package/dist/AppleFiles-g4g8431e.png +0 -0
- package/dist/ApplePhotos-f2nesvx1.png +0 -0
- package/dist/Application-ft1as292.png +0 -0
- package/dist/Application_Light-h2p2z3de.png +0 -0
- package/dist/Archive-20-y262mxsm.png +0 -0
- package/dist/Archive-vmmq3f0p.png +0 -0
- package/dist/Archive_Light-fqxdt82g.png +0 -0
- package/dist/Audio-20-345hqxr8.png +0 -0
- package/dist/Audio-3w697yx9.png +0 -0
- package/dist/Audio_Light-4pb6z10h.png +0 -0
- package/dist/BackBlaze-6m4qpkyc.png +0 -0
- package/dist/Ball-d0bcgqha.png +0 -0
- package/dist/Book-20-etd4fzhm.png +0 -0
- package/dist/Book-ekfqxh7a.png +0 -0
- package/dist/BookBlue-17k9z7dy.png +0 -0
- package/dist/Book_Light-0n5wsr76.png +0 -0
- package/dist/Box-rd26c0g6.png +0 -0
- package/dist/CloudSync-wxh5ez5h.png +0 -0
- package/dist/CloudSync_Light-nb09rvv4.png +0 -0
- package/dist/Code-20-ybgq5j59.png +0 -0
- package/dist/Collection-20-7g9nzzcf.png +0 -0
- package/dist/Collection-52f2j9wx.png +0 -0
- package/dist/CollectionSparkle-nj38wazp.png +0 -0
- package/dist/CollectionSparkle_Light-hp1jptvv.png +0 -0
- package/dist/Collection_Light-z7p3knd7.png +0 -0
- package/dist/Compute-ghst3emj.png +0 -0
- package/dist/Config-20-vqd0vqeb.png +0 -0
- package/dist/DAV-mr5nm7zs.png +0 -0
- package/dist/Database-20-0q97pw36.png +0 -0
- package/dist/Database-rcxjw7yv.png +0 -0
- package/dist/Database_Light-1dxfaj96.png +0 -0
- package/dist/DeleteLocation-3hw52syq.png +0 -0
- package/dist/Devices-t2f2k803.png +0 -0
- package/dist/Document-20-0f78jpbp.png +0 -0
- package/dist/Document-kgsdt3nq.png +0 -0
- package/dist/Document_Light-ht9avf71.png +0 -0
- package/dist/Document_doc-wqd2zqp2.png +0 -0
- package/dist/Document_doc_Light-4ppbm2he.png +0 -0
- package/dist/Document_memory-6vymqjra.png +0 -0
- package/dist/Document_pdf-7b1zt469.png +0 -0
- package/dist/Document_pdf_Light-42j6dt8z.png +0 -0
- package/dist/Document_srt-symqv91r.png +0 -0
- package/dist/Document_xls-j5tbzav2.png +0 -0
- package/dist/Document_xls_Light-w6kbrvem.png +0 -0
- package/dist/Document_xmp-7xqx4tm8.png +0 -0
- package/dist/Dotfile-20-w53rabv6.png +0 -0
- package/dist/Drive-7wb1bf5w.png +0 -0
- package/dist/Drive-AmazonS3_Light-z6j2s9xm.png +0 -0
- package/dist/Drive-BackBlaze_Light-tr4wfkey.png +0 -0
- package/dist/Drive-DAV_Light-kse85f46.png +0 -0
- package/dist/Drive-Darker-mss4n9ws.png +0 -0
- package/dist/Drive-Dropbox_Light-48naz6gc.png +0 -0
- package/dist/Drive-GoogleDrive_Light-t4d4180c.png +0 -0
- package/dist/Drive-Mega-z6k8n821.png +0 -0
- package/dist/Drive-Mega_Light-nk0qskfb.png +0 -0
- package/dist/Drive-OneDrive-sx649zqw.png +0 -0
- package/dist/Drive-OneDrive_Light-2n556kpe.png +0 -0
- package/dist/Drive-OpenStack-tcs5rge7.png +0 -0
- package/dist/Drive-OpenStack_Light-05qnc2gy.png +0 -0
- package/dist/Drive-PCloud_Light-d0h9kbwp.png +0 -0
- package/dist/Drive-box_Light-0cb17zc1.png +0 -0
- package/dist/Drive_Light-dcjdmxm9.png +0 -0
- package/dist/Dropbox-q4nkmy9v.png +0 -0
- package/dist/Encrypted-20-m8ax3zxz.png +0 -0
- package/dist/Encrypted-ddrf9wk4.png +0 -0
- package/dist/Encrypted_Light-n1mjh529.png +0 -0
- package/dist/Entity-a4438mse.png +0 -0
- package/dist/Entity_Light-acxm9r2c.png +0 -0
- package/dist/Executable-20-fp7e8r9j.png +0 -0
- package/dist/Executable_Light_old-6xd6fa1z.png +0 -0
- package/dist/Executable_old-cyj158kz.png +0 -0
- package/dist/Face_Light-pjctyrvt.png +0 -0
- package/dist/Folder-20-r5505wvj.png +0 -0
- package/dist/Folder-kc594khj.png +0 -0
- package/dist/Folder-tag-xmp-ff4bgkr4.png +0 -0
- package/dist/FolderGrey-2vy13evc.png +0 -0
- package/dist/FolderGrey_Light-7z31xy56.png +0 -0
- package/dist/FolderNoSpace-d65fr1rz.png +0 -0
- package/dist/FolderNoSpace_Light-r5fc4pfj.png +0 -0
- package/dist/Folder_Light-rrg0jy36.png +0 -0
- package/dist/Font-20-r5n0z7f9.png +0 -0
- package/dist/Game-ts1kdw4e.png +0 -0
- package/dist/Game_Light-4d6ty5nz.png +0 -0
- package/dist/Globe-b379ffpd.png +0 -0
- package/dist/GlobeAlt-2mjbsvpp.png +0 -0
- package/dist/Globe_Light-2r9sdhb0.png +0 -0
- package/dist/GoogleDrive-1swewbzf.png +0 -0
- package/dist/GoogleSansFlex-latin-23tdmmt1.woff2 +0 -0
- package/dist/HDD-e85re2j5.png +0 -0
- package/dist/HDD_Light-pfbhb5wg.png +0 -0
- package/dist/Heart-3nx0yjvz.png +0 -0
- package/dist/Heart_Light-msf9zhq6.png +0 -0
- package/dist/Home-waerfpg1.png +0 -0
- package/dist/Home_Light-mdswjrcg.png +0 -0
- package/dist/Image-20-7vvqrhrb.png +0 -0
- package/dist/Image-fz5c8462.png +0 -0
- package/dist/Image_Light-rp0w5n3r.png +0 -0
- package/dist/Indexed-nxd6ctrt.png +0 -0
- package/dist/Key-20-z5nhfv0c.png +0 -0
- package/dist/Key-4en80vnn.png +0 -0
- package/dist/Key_Light-h3pc5e2c.png +0 -0
- package/dist/Keys-9jknyggw.png +0 -0
- package/dist/Keys_Light-5w8kcsmz.png +0 -0
- package/dist/Laptop-9gwskqny.png +0 -0
- package/dist/Laptop_Light-pwtbqbkp.png +0 -0
- package/dist/Link-20-f7hh1tcv.png +0 -0
- package/dist/Link-w9y1yad0.png +0 -0
- package/dist/Link_Light-4dy9pa5j.png +0 -0
- package/dist/Location-7vx0yx6r.png +0 -0
- package/dist/LocationManaged-w1n71jx5.png +0 -0
- package/dist/LocationReplica-4c6ncswq.png +0 -0
- package/dist/Lock-mnveqyfm.png +0 -0
- package/dist/Lock_Light-xwnbzkjz.png +0 -0
- package/dist/Mega-h4j4t3sb.png +0 -0
- package/dist/Mesh-20-rkky209q.png +0 -0
- package/dist/Mesh-efjcay8j.png +0 -0
- package/dist/Mesh_Light-t9yyzb3y.png +0 -0
- package/dist/MiniSilverBox-g8dfw0cp.png +0 -0
- package/dist/Mobile-Android-wy5kr3bj.png +0 -0
- package/dist/Mobile-jpsv7vp8.png +0 -0
- package/dist/Mobile_Light-2rwnn5bx.png +0 -0
- package/dist/MoveLocation-kft0z94v.png +0 -0
- package/dist/MoveLocation_Light-c23j5x59.png +0 -0
- package/dist/Movie-nxat82kv.png +0 -0
- package/dist/Movie_Light-eh1hmsr5.png +0 -0
- package/dist/NewLocation-2hfv9dwq.png +0 -0
- package/dist/Node-wykht7k0.png +0 -0
- package/dist/Node_Light-maewxhk1.png +0 -0
- package/dist/OneDrive-e4jvssjp.png +0 -0
- package/dist/OpenStack-pqp01jfd.png +0 -0
- package/dist/PC-eyfa7ewm.png +0 -0
- package/dist/PCloud-p0n6g1hq.png +0 -0
- package/dist/Package-20-grg5wkse.png +0 -0
- package/dist/Package-d7ex1fnn.png +0 -0
- package/dist/Package_Light-yj2cvgyw.png +0 -0
- package/dist/SD-h17wvz4z.png +0 -0
- package/dist/SD_Light-y3mmqh6b.png +0 -0
- package/dist/Scrapbook-f92c8p1x.png +0 -0
- package/dist/Scrapbook_Light-50pjr0q7.png +0 -0
- package/dist/Screenshot-20-z4tfe78m.png +0 -0
- package/dist/Screenshot-9nd23fde.png +0 -0
- package/dist/ScreenshotAlt-en1yt2gv.png +0 -0
- package/dist/Screenshot_Light-hnbah84r.png +0 -0
- package/dist/Search-7x8c5z1s.png +0 -0
- package/dist/SearchAlt-dmxzk2jb.png +0 -0
- package/dist/Search_Light-n23xd2ws.png +0 -0
- package/dist/Server-hqsf8851.png +0 -0
- package/dist/Server_Light-3x01jqz4.png +0 -0
- package/dist/SilverBox-0mk6sxrh.png +0 -0
- package/dist/Spacedrop-1-d230z0az.png +0 -0
- package/dist/Spacedrop-r1t67bcq.png +0 -0
- package/dist/Spacedrop_Light-dj5tgtep.png +0 -0
- package/dist/Storage-4x2q4nx6.png +0 -0
- package/dist/Sync-531te7fq.png +0 -0
- package/dist/Sync_Light-754vfxyr.png +0 -0
- package/dist/Tablet-ze6ermb7.png +0 -0
- package/dist/Tablet_Light-32skyk12.png +0 -0
- package/dist/Tags-bfapk266.png +0 -0
- package/dist/Tags_Light-7s00envw.png +0 -0
- package/dist/Terminal-t1yjx33x.png +0 -0
- package/dist/Terminal_Light-4s5azdgr.png +0 -0
- package/dist/Text-20-pt0zjg62.png +0 -0
- package/dist/Text-6fgmf4b2.png +0 -0
- package/dist/TextAlt_Light-w9kbgvm8.png +0 -0
- package/dist/Text_Light-c2k3w31k.png +0 -0
- package/dist/Text_txt-xhvv80ys.png +0 -0
- package/dist/TexturedMesh-ysk831xz.png +0 -0
- package/dist/TexturedMesh_Light-4twy5k6k.png +0 -0
- package/dist/Trash-hzscccvk.png +0 -0
- package/dist/Trash_Light-78nc56tp.png +0 -0
- package/dist/Undefined-pkbecmq4.png +0 -0
- package/dist/Undefined_Light-jxesg2zv.png +0 -0
- package/dist/Unknown-20-07efh8ya.png +0 -0
- package/dist/Video-20-q7yg9p4w.png +0 -0
- package/dist/Video-370fzqyw.png +0 -0
- package/dist/Video_Light-00vhrp0m.png +0 -0
- package/dist/WebPageArchive-20-wn0v4x27.png +0 -0
- package/dist/Widget-20-9t860nnc.png +0 -0
- package/dist/Widget-k1p15mg9.png +0 -0
- package/dist/Widget_Light-5md790ar.png +0 -0
- package/dist/ace-ph0rt669.svg +1 -0
- package/dist/acemanifest-je939qnz.svg +1 -0
- package/dist/adoc-kfbf89h8.svg +1 -0
- package/dist/adonis-pn6tbmnq.svg +1 -0
- package/dist/adonisconfig-5wfnycbk.svg +1 -0
- package/dist/afdesign-5nzbppfa.svg +1 -0
- package/dist/afphoto-p941z6q7.svg +1 -0
- package/dist/afpub-3232tcp9.svg +1 -0
- package/dist/ai-vvwvj03w.svg +1 -0
- package/dist/air-e3h8cfx1.svg +1 -0
- package/dist/angular-fyg22v82.svg +1 -0
- package/dist/angular-kzcwnjdt.svg +1 -0
- package/dist/anim-15kqy432.svg +1 -0
- package/dist/astro-wdcxh4zx.svg +1 -0
- package/dist/astroconfig-73qsx73n.svg +1 -0
- package/dist/atomizer-42xe88w7.svg +1 -0
- package/dist/audio-xy5qb7t1.svg +1 -0
- package/dist/audiomp3-s01feh78.svg +1 -0
- package/dist/audioogg-bcake0v6.svg +1 -0
- package/dist/audiowav-px37pxve.svg +1 -0
- package/dist/audiowv-bq8tbfdv.svg +1 -0
- package/dist/azure-veqzyzqq.svg +1 -0
- package/dist/babel-vxcfp57a.svg +1 -0
- package/dist/ballerina-faxx9p3b.svg +1 -0
- package/dist/ballerinaconfig-tmd09kkg.svg +1 -0
- package/dist/bat-vjr63aqs.svg +1 -0
- package/dist/bazel-4e01p5gp.svg +1 -0
- package/dist/bazelignore-wzgc7h2d.svg +1 -0
- package/dist/bicep-dae0dh59.svg +1 -0
- package/dist/bicepconfig-v64442sp.svg +1 -0
- package/dist/bicepparam-ts4jjq60.svg +1 -0
- package/dist/binary-dz3thnjq.svg +1 -0
- package/dist/biome-gbahcmjy.svg +1 -0
- package/dist/blade-je22xc2d.svg +1 -0
- package/dist/brotli-1m7qfk77.svg +1 -0
- package/dist/browserslist-005php91.svg +1 -0
- package/dist/bruno-h4bh0s2c.svg +1 -0
- package/dist/bsconfig-gmwc0r2r.svg +1 -0
- package/dist/buck-gtasjqw1.svg +1 -0
- package/dist/bun-6y6y7t4s.svg +1 -0
- package/dist/bun-zxmcandz.svg +1 -0
- package/dist/bundler-qhs5a5xb.svg +1 -0
- package/dist/bunlock-74b62xbm.svg +1 -0
- package/dist/c-k2se7t6q.svg +1 -0
- package/dist/c-v9cxtxe1.svg +1 -0
- package/dist/cargo-ma5bwyg5.svg +1 -0
- package/dist/cargolock-ak0tnv5y.svg +1 -0
- package/dist/cert-z62mqtqq.svg +1 -0
- package/dist/cheader-mgw2nf38.svg +1 -0
- package/dist/chunk-08yjrfs5.js +2 -0
- package/dist/chunk-2pmrsdd5.js +2 -0
- package/dist/chunk-3995cv9k.js +1 -0
- package/dist/chunk-58a3eq49.js +2 -0
- package/dist/chunk-616szvb9.js +2 -0
- package/dist/chunk-6638b8v6.js +1 -0
- package/dist/chunk-6ej2n64j.js +1 -0
- package/dist/chunk-7tt0cawd.js +10 -0
- package/dist/chunk-9gxv4c5g.js +1 -0
- package/dist/chunk-9na12mjw.js +1 -0
- package/dist/chunk-b7mpjcry.js +1 -0
- package/dist/chunk-c1g6tshf.js +2 -0
- package/dist/chunk-d50zvrb1.css +1 -0
- package/dist/chunk-d6c35fm0.js +2 -0
- package/dist/chunk-ehpz56xv.js +2 -0
- package/dist/chunk-ewtr6sjm.js +9 -0
- package/dist/chunk-g9rnrhvz.js +2 -0
- package/dist/chunk-gv83r4qx.js +262 -0
- package/dist/chunk-j46wg1ym.js +156 -0
- package/dist/chunk-kapsksxf.js +1 -0
- package/dist/chunk-m98tyb4g.js +6 -0
- package/dist/chunk-nn0prq25.js +2 -0
- package/dist/chunk-nsgjb3bx.js +2 -0
- package/dist/chunk-p8r6wjkz.js +3 -0
- package/dist/chunk-rdnm87fw.js +1 -0
- package/dist/chunk-re36kkra.js +1 -0
- package/dist/chunk-vm9edd26.js +2 -0
- package/dist/chunk-x2hztqk0.css +1 -0
- package/dist/chunk-yyxb5zbq.js +2 -0
- package/dist/civet-5bbs33v3.svg +1 -0
- package/dist/claude-jscxahsf.svg +1 -0
- package/dist/cli-4f5nfe5s.svg +1 -0
- package/dist/clojure-0h7h9znc.svg +1 -0
- package/dist/cmake-q8ryfre0.svg +1 -0
- package/dist/cmake-qwe6x8nx.svg +1 -0
- package/dist/codeworkspace-326020b4.svg +1 -0
- package/dist/coffeescript-ec1bytnk.svg +1 -0
- package/dist/commitlint-93j0tfvp.svg +1 -0
- package/dist/compodoc-36b7gn70.svg +1 -0
- package/dist/composer-vv2tvxkr.svg +1 -0
- package/dist/composerlock-nf0232yh.svg +1 -0
- package/dist/conan-dggdfcr9.svg +1 -0
- package/dist/conf-5756g97p.svg +1 -0
- package/dist/copilot-1phy76q3.svg +1 -0
- package/dist/cpp-4yvddm6j.svg +1 -0
- package/dist/cpp-pbznrtpp.svg +1 -0
- package/dist/crystal-x20aj00e.svg +1 -0
- package/dist/csharp-0p3hstq8.svg +1 -0
- package/dist/csharp-cpmfe8y0.svg +1 -0
- package/dist/cshtml-xb5gtb0r.svg +1 -0
- package/dist/csproj-ftptw15a.svg +1 -0
- package/dist/css-tqps22nw.svg +1 -0
- package/dist/css-ycr1qc5f.svg +1 -0
- package/dist/cssmap-3gnm34f6.svg +1 -0
- package/dist/csv-gg0axfar.svg +1 -0
- package/dist/cucumber-m06dfkm5.svg +1 -0
- package/dist/cursor-jw7n7tpq.svg +1 -0
- package/dist/cypress-xsm2fq1p.svg +1 -0
- package/dist/cypressjs-hapzyfm1.svg +1 -0
- package/dist/cypressts-jey9ahc7.svg +1 -0
- package/dist/d-4x2njcan.svg +1 -0
- package/dist/dartlang-7dwdwv03.svg +1 -0
- package/dist/dartlang-mra7r0f8.svg +1 -0
- package/dist/delphiproject-7snmvsdx.svg +1 -0
- package/dist/diff-hekg2jpm.svg +1 -0
- package/dist/docker-8q58y2kc.svg +1 -0
- package/dist/dockerdebug-8zhgj7bd.svg +1 -0
- package/dist/dockerignore-488safx9.svg +1 -0
- package/dist/drawio-6qm0rhkv.svg +1 -0
- package/dist/drizzle-5bct2tg6.svg +1 -0
- package/dist/dsstore-pmhpmkdr.svg +1 -0
- package/dist/dune-r4xhac56.svg +1 -0
- package/dist/duneproject-3b99jndq.svg +1 -0
- package/dist/edge-0jwced3c.svg +1 -0
- package/dist/editorconfig-hee1zp1h.svg +1 -0
- package/dist/eex-q1bkj66x.svg +1 -0
- package/dist/elixir-48ge02m5.svg +1 -0
- package/dist/elm-97mh5wye.svg +1 -0
- package/dist/env-ysamxkcd.svg +1 -0
- package/dist/eraser-7mejjgrg.svg +1 -0
- package/dist/erb-f28j5x6b.svg +1 -0
- package/dist/erlang-3ebtbtfw.svg +1 -0
- package/dist/esbuild-wptxye5y.svg +1 -0
- package/dist/eslint-mrbexpc5.svg +1 -0
- package/dist/eslintignore-k65wpbsr.svg +1 -0
- package/dist/excalidraw-28avfa1h.svg +1 -0
- package/dist/exs-5w2cfpaf.svg +1 -0
- package/dist/exx-s897xhz3.svg +1 -0
- package/dist/farm-m80hxnfy.svg +1 -0
- package/dist/favicon-djc6sne4.svg +1 -0
- package/dist/figma-krwq889b.svg +1 -0
- package/dist/file-hetj1tjc.svg +1 -0
- package/dist/file_light-jx35pv2m.svg +1 -0
- package/dist/flakelock-2nsqn4gw.svg +1 -0
- package/dist/flutter-277q83en.svg +1 -0
- package/dist/flutterlock-h0nywsvt.svg +1 -0
- package/dist/flutterpackage-cpgnfwtt.svg +1 -0
- package/dist/folder-2xmsfyxp.svg +1 -0
- package/dist/folder_open-wk4ndx1f.svg +1 -0
- package/dist/fonteot-a8xmqj3j.svg +1 -0
- package/dist/fontotf-f01hg174.svg +1 -0
- package/dist/fontttf-pcr3rt21.svg +1 -0
- package/dist/fontwoff-v1gdka62.svg +1 -0
- package/dist/fontwoff2-1w1r47x8.svg +1 -0
- package/dist/freemarker-s9m714ah.svg +1 -0
- package/dist/fsharp-89mjndn4.svg +1 -0
- package/dist/gbl-v20qxsgx.svg +1 -0
- package/dist/git-wc9x7c5e.svg +1 -0
- package/dist/gitlab-bhcvbetz.svg +1 -0
- package/dist/gleam-h2ze8vtz.svg +1 -0
- package/dist/gleamconfig-6sq0xy19.svg +1 -0
- package/dist/go-15qaph9s.svg +1 -0
- package/dist/go-j2dk6r7k.svg +1 -0
- package/dist/go_package-5nc95prx.svg +1 -0
- package/dist/godot-v7nnsyvc.svg +1 -0
- package/dist/gradle-khh2bn3v.svg +1 -0
- package/dist/gradlebat-631878b0.svg +1 -0
- package/dist/gradlekotlin-f8netdbt.svg +1 -0
- package/dist/grain-tztem5b9.svg +1 -0
- package/dist/graphql-egmdpvzr.svg +1 -0
- package/dist/groovy-c0sstajm.svg +1 -0
- package/dist/grunt-56ssa3fr.svg +1 -0
- package/dist/gulp-j7wc27hd.svg +1 -0
- package/dist/h-4xbbejcs.svg +1 -0
- package/dist/haml-6pyt136a.svg +1 -0
- package/dist/handlebars-1v8g0n32.svg +1 -0
- package/dist/hardhat-1k6gym6f.svg +1 -0
- package/dist/hash-xd1ymkyp.svg +1 -0
- package/dist/hashicorp-vty9d6de.svg +1 -0
- package/dist/haskell-ncbxh3wk.svg +1 -0
- package/dist/haxe-j5nqdw5z.svg +1 -0
- package/dist/haxeml-bn7wtpx1.svg +1 -0
- package/dist/hpp-rpxcfk6j.svg +1 -0
- package/dist/htaccess-s4rrm1re.svg +1 -0
- package/dist/html-3vbw2fxn.svg +1 -0
- package/dist/html-v1z6sanr.svg +1 -0
- package/dist/http-9bfh1zqw.svg +1 -0
- package/dist/identifier-6gsrr6st.svg +1 -0
- package/dist/image-pstdg0vj.svg +1 -0
- package/dist/imagegif-any2rrn3.svg +1 -0
- package/dist/imageico-cng69rft.svg +1 -0
- package/dist/imagejpg-rtx9yy9y.svg +1 -0
- package/dist/imagepng-j6f306v1.svg +1 -0
- package/dist/imagewebp-q1mcm8np.svg +1 -0
- package/dist/imba-xxn1q1r2.svg +1 -0
- package/dist/index.html +16 -0
- package/dist/info-qssn7jw5.svg +1 -0
- package/dist/instructions-3068x11a.svg +1 -0
- package/dist/ipynb-qm8fb1p1.svg +1 -0
- package/dist/jar-src0eb7a.svg +1 -0
- package/dist/java-126v951r.svg +1 -0
- package/dist/java-hhh3k9xf.svg +1 -0
- package/dist/jenkins-ap6tzby2.svg +1 -0
- package/dist/jest-xrtp7hh0.svg +1 -0
- package/dist/jinja-v9kggcps.svg +1 -0
- package/dist/js-qsntbmzx.svg +1 -0
- package/dist/js-r0b86hmj.svg +1 -0
- package/dist/jsmap-1ns6yn3z.svg +1 -0
- package/dist/json-1jhmg3gf.svg +1 -0
- package/dist/jsp-7n103tna.svg +1 -0
- package/dist/julia-nba7etbq.svg +1 -0
- package/dist/karma-zcbeze4p.svg +1 -0
- package/dist/keep-tw8xf3gf.svg +1 -0
- package/dist/key-hd2nnhmr.svg +1 -0
- package/dist/knex-87w40q0j.svg +1 -0
- package/dist/knip-kzsz2w4s.svg +1 -0
- package/dist/kotlin-360tzrt1.svg +1 -0
- package/dist/kotlin-hbykz1k8.svg +1 -0
- package/dist/kotlins-4zz4rshm.svg +1 -0
- package/dist/krita-wx5qyrx7.svg +1 -0
- package/dist/latex-jwrpzd2b.svg +1 -0
- package/dist/launch-8wsjpmd3.svg +1 -0
- package/dist/lazarusproject-gma2fvya.svg +1 -0
- package/dist/less-p4zwh19p.svg +1 -0
- package/dist/license-qamq8mp3.svg +1 -0
- package/dist/light_editorconfig-k28g3f4k.svg +1 -0
- package/dist/liquid-wtexakya.svg +1 -0
- package/dist/llvm-cfgd7591.svg +1 -0
- package/dist/lock-wv5q3nef.svg +1 -0
- package/dist/log-ykdkwnpq.svg +1 -0
- package/dist/lua-aynthw24.svg +1 -0
- package/dist/m-va54fte8.svg +1 -0
- package/dist/m3-bun.manifest.json +3785 -0
- package/dist/makefile-kkcgz3sb.svg +1 -0
- package/dist/manifest-ede4t0vc.svg +1 -0
- package/dist/markdown-x7kezf76.svg +1 -0
- package/dist/markdownx-y5mf21hn.svg +1 -0
- package/dist/maven-djc7vb1b.svg +1 -0
- package/dist/mermaid-4bpjjghk.svg +1 -0
- package/dist/mesh-q798mf4t.svg +1 -0
- package/dist/mgcb-cfmfr63b.svg +1 -0
- package/dist/mint-b732cej4.svg +1 -0
- package/dist/mix-41smb4q2.svg +1 -0
- package/dist/mixlock-z0cvwpkq.svg +1 -0
- package/dist/mjml-4kzxtz0b.svg +1 -0
- package/dist/mkdocs-5t1davz8.svg +1 -0
- package/dist/mockoon-5pw3ckhf.svg +1 -0
- package/dist/motoko-yv95035d.svg +1 -0
- package/dist/mov-r3cjb3vr.svg +1 -0
- package/dist/mp4-31hded8m.svg +1 -0
- package/dist/mtl-01f1f06m.svg +1 -0
- package/dist/mustache-1s62ewsg.svg +1 -0
- package/dist/nelua-97199e3p.svg +1 -0
- package/dist/neon-gcp7rsp5.svg +1 -0
- package/dist/nestjs-sme3dmgk.svg +1 -0
- package/dist/nestjscontroller-2ceskrfc.svg +1 -0
- package/dist/nestjsdecorator-52k9dwm2.svg +1 -0
- package/dist/nestjsdto-xf36my7y.svg +1 -0
- package/dist/nestjsentity-q17fyvm1.svg +1 -0
- package/dist/nestjsfilter-qytmtqzj.svg +1 -0
- package/dist/nestjsguard-4pyb34xe.svg +1 -0
- package/dist/nestjsinterceptor-7s690j87.svg +1 -0
- package/dist/nestjsmodule-zeyz5633.svg +1 -0
- package/dist/nestjsrepository-kz26s1jf.svg +1 -0
- package/dist/nestjsresolver-8qdvexrk.svg +1 -0
- package/dist/nestjsservice-kp3b933m.svg +1 -0
- package/dist/nestscheduler-60p4j2tg.svg +1 -0
- package/dist/netlify-bbgdw42s.svg +1 -0
- package/dist/nextconfig-gr1sd69d.svg +1 -0
- package/dist/nextron-sf3ag316.svg +1 -0
- package/dist/nginx-73stz0yt.svg +1 -0
- package/dist/nim-gqnvnkc5.svg +1 -0
- package/dist/nix-t1m4qhc8.svg +1 -0
- package/dist/njk-dfv3nrxr.svg +1 -0
- package/dist/node-w3gp0xxn.svg +1 -0
- package/dist/nodemon-q41mkhvz.svg +1 -0
- package/dist/npm-rt8ga6qx.svg +1 -0
- package/dist/npmlock-8p4sp377.svg +1 -0
- package/dist/nuxt-13qdp31g.svg +1 -0
- package/dist/nvidia-fysz92ep.svg +1 -0
- package/dist/nvim-h3ynkfqg.svg +1 -0
- package/dist/nvm-ser6majj.svg +1 -0
- package/dist/nx-av0cw2sw.svg +1 -0
- package/dist/obj-thakg863.svg +1 -0
- package/dist/ocaml-maevkwa7.svg +1 -0
- package/dist/ocamli-w0gc5jq8.svg +1 -0
- package/dist/ocamll-h2wysvh1.svg +1 -0
- package/dist/ocamly-ppj6pfy3.svg +1 -0
- package/dist/odin-x7qb7b6x.svg +1 -0
- package/dist/opengl-h6pbxg3n.svg +1 -0
- package/dist/oxlint-7qwxtp86.svg +1 -0
- package/dist/panda-9qqa1nn4.svg +1 -0
- package/dist/parcel-gzckrwpy.svg +1 -0
- package/dist/pascal-kj6crs4h.svg +1 -0
- package/dist/pdf-wk39v1nv.svg +1 -0
- package/dist/perl-11dgrnh8.svg +1 -0
- package/dist/perlm-7xrwgd93.svg +1 -0
- package/dist/pfx-ggdb4v6p.svg +1 -0
- package/dist/photoshop-m3gw1xv7.svg +1 -0
- package/dist/php-jgyt96zk.svg +1 -0
- package/dist/php-jx84j7ns.svg +1 -0
- package/dist/plantuml-04ncqrmc.svg +1 -0
- package/dist/playright-dfc8tvme.svg +1 -0
- package/dist/plop-n71aee6w.svg +1 -0
- package/dist/pnpm-jvkts1qb.svg +1 -0
- package/dist/pnpmlock-2kqbdtn7.svg +1 -0
- package/dist/poetry-yjeeyvtr.svg +1 -0
- package/dist/poetrylock-da30xbws.svg +1 -0
- package/dist/postcssconfig-yyvnwr01.svg +1 -0
- package/dist/powershell-hf358xbb.svg +1 -0
- package/dist/powershelldata-nggemhrs.svg +1 -0
- package/dist/powershellmodule-v5wz6sed.svg +1 -0
- package/dist/precommit-wmfmt8tq.svg +1 -0
- package/dist/prettier-nyc1v0qk.svg +1 -0
- package/dist/prettierignore-hx4x759w.svg +1 -0
- package/dist/prisma-te242v0q.svg +1 -0
- package/dist/prolog-twb6h758.svg +1 -0
- package/dist/prompt-eg8c0gqa.svg +1 -0
- package/dist/properties-c39zkae1.svg +1 -0
- package/dist/proto-rsvsx4xb.svg +1 -0
- package/dist/pug-rqxd67km.svg +1 -0
- package/dist/pvk-bc4g1qms.svg +1 -0
- package/dist/py-0g79s39m.svg +1 -0
- package/dist/pyproject-5s59g4en.svg +1 -0
- package/dist/python-ds482k8k.svg +1 -0
- package/dist/qt-y3kxpf67.svg +1 -0
- package/dist/quarkus-xrq4b999.svg +1 -0
- package/dist/quasar-hvna6b7f.svg +1 -0
- package/dist/r-n1bnfab8.svg +1 -0
- package/dist/racket-vx5e6n1d.svg +1 -0
- package/dist/raku-4ydzc5wj.svg +1 -0
- package/dist/razor-cbqpr6vt.svg +1 -0
- package/dist/rb-mfkwkq7e.svg +1 -0
- package/dist/reactjs-qjyhk3rf.svg +1 -0
- package/dist/reactts-p0hf29yr.svg +1 -0
- package/dist/readme-3qcyy95y.svg +1 -0
- package/dist/redis-ya1xyn4v.svg +1 -0
- package/dist/rego-tr1y9cqm.svg +1 -0
- package/dist/remix-61pbjda4.svg +1 -0
- package/dist/rescript-9c3xnepn.svg +1 -0
- package/dist/rescriptinterface-6ne0a2rf.svg +1 -0
- package/dist/restructuredtext-7k21mjx4.svg +1 -0
- package/dist/rjson-3s2edhhr.svg +1 -0
- package/dist/robots-geh7c3pq.svg +1 -0
- package/dist/rollup-0dxydzr9.svg +1 -0
- package/dist/rome-1gxetp8g.svg +1 -0
- package/dist/ron-ft34rzr3.svg +1 -0
- package/dist/root_folder-rhwm7290.svg +1 -0
- package/dist/root_folder_light-ngkg5m4x.svg +1 -0
- package/dist/root_folder_light_open-c6nhg6sy.svg +1 -0
- package/dist/root_folder_open-genv0ps7.svg +1 -0
- package/dist/rs-60bcevwn.svg +1 -0
- package/dist/ruby-7j5zzh38.svg +1 -0
- package/dist/rust-a9528zdg.svg +1 -0
- package/dist/rustfmt-c8evpzd7.svg +1 -0
- package/dist/sails-5ecccxrg.svg +1 -0
- package/dist/salesforce-4d89045j.svg +1 -0
- package/dist/sass-g9qbr3x4.svg +1 -0
- package/dist/scala-8gnn0ekc.svg +1 -0
- package/dist/scss-g9qbr3x4.svg +1 -0
- package/dist/sentinel-g8py3peh.svg +1 -0
- package/dist/sequelize-qvzwnjhv.svg +1 -0
- package/dist/sh-bkp0n5vb.svg +1 -0
- package/dist/shaderlab-gkww43v2.svg +1 -0
- package/dist/shell-kc0a9zjq.svg +1 -0
- package/dist/silq-mczpsqmz.svg +1 -0
- package/dist/slim-8j9jf3zt.svg +1 -0
- package/dist/sln-nketqakm.svg +1 -0
- package/dist/smarty-w1zxys1s.svg +1 -0
- package/dist/sol-adyfjwzz.svg +1 -0
- package/dist/spc-kk30w5m6.svg +1 -0
- package/dist/sql-3c4gcy7a.svg +1 -0
- package/dist/sqlite-cppkxr0a.svg +1 -0
- package/dist/storybook-885ssp75.svg +1 -0
- package/dist/stylelint-z7s6yhc9.svg +1 -0
- package/dist/stylelintignore-xwnh8sx1.svg +1 -0
- package/dist/stylus-qz53ytkd.svg +1 -0
- package/dist/suo-3fvnz3bx.svg +1 -0
- package/dist/svelte-jp3x9gw7.svg +1 -0
- package/dist/svelteconfig-m0n00zjj.svg +1 -0
- package/dist/svg-8dyqf96t.svg +1 -0
- package/dist/swift-8g870v6j.svg +1 -0
- package/dist/symfony-q77kcepw.svg +1 -0
- package/dist/tailwind-3es9cgbd.svg +1 -0
- package/dist/tauri-xnj526kw.svg +1 -0
- package/dist/taze-e3ykqs0k.svg +1 -0
- package/dist/terrafile-gqn1tysh.svg +1 -0
- package/dist/terraform-jy4fbwsr.svg +1 -0
- package/dist/terraformvars-05qje1sw.svg +1 -0
- package/dist/terraformversion-gq2tkwmn.svg +1 -0
- package/dist/testjs-sqgjsb8h.svg +1 -0
- package/dist/testts-19m1sf26.svg +1 -0
- package/dist/tmpl-enggw2gc.svg +1 -0
- package/dist/todo-ccw0mpg2.svg +1 -0
- package/dist/toml-rmx5hba4.svg +1 -0
- package/dist/toolversions-s7fttfyp.svg +1 -0
- package/dist/tox-a4j4yvmb.svg +1 -0
- package/dist/travis-gr3jtpx2.svg +1 -0
- package/dist/tres-qt3kk1t0.svg +1 -0
- package/dist/ts-7amn21ms.svg +1 -0
- package/dist/tscn-g1jthb4m.svg +1 -0
- package/dist/tsconfig-r1s750bq.svg +1 -0
- package/dist/tsx-a3rsjrrz.svg +1 -0
- package/dist/turbo-dcmj75tc.svg +1 -0
- package/dist/twig-3xgrb919.svg +1 -0
- package/dist/txt-y0t8b72p.svg +1 -0
- package/dist/typescript-kd5g4jkg.svg +1 -0
- package/dist/typescriptdef-y43343m6.svg +1 -0
- package/dist/ui-pxvg5zj2.svg +1 -0
- package/dist/unocss-b0f5fthj.svg +1 -0
- package/dist/user-q7tk1k2d.svg +1 -0
- package/dist/v-c25jfygk.svg +1 -0
- package/dist/vanillaextract-3w6vds6m.svg +1 -0
- package/dist/vb-87ckj7t3.svg +1 -0
- package/dist/vercel-hfxjvaj9.svg +1 -0
- package/dist/version-zd7hfmf1.svg +1 -0
- package/dist/vhd-xaw7zbny.svg +1 -0
- package/dist/vhdl-s308rb5a.svg +1 -0
- package/dist/video-z6khth5y.svg +1 -0
- package/dist/vite-5g5xkmpk.svg +1 -0
- package/dist/viteenv-jbmx0tb0.svg +1 -0
- package/dist/vitest-5267dzt2.svg +1 -0
- package/dist/vmod-8jftapdc.svg +1 -0
- package/dist/vscode-8tvcs7ae.svg +1 -0
- package/dist/vue-j5sjdz4b.svg +1 -0
- package/dist/vue-x9h2d0d2.svg +1 -0
- package/dist/vueconfig-726zh8dd.svg +1 -0
- package/dist/wasm-vgmg9kv4.svg +1 -0
- package/dist/webpack-hfwce90m.svg +1 -0
- package/dist/wgsl-68923cz5.svg +1 -0
- package/dist/windi-c9m8en7k.svg +1 -0
- package/dist/wren-7ep5ph5r.svg +1 -0
- package/dist/xmake-mc60ax7m.svg +1 -0
- package/dist/xml-feq1fbt4.svg +1 -0
- package/dist/yaml-n43aw0fx.svg +1 -0
- package/dist/yang-mtcxs2mg.svg +1 -0
- package/dist/yarn-k4k6e35h.svg +1 -0
- package/dist/yarnerror-5jkesx9j.svg +1 -0
- package/dist/yarnignore-ryh8jd5p.svg +1 -0
- package/dist/yarnlock-9zvhbg04.svg +1 -0
- package/dist/yin-f931bzgj.svg +1 -0
- package/dist/zig-nx2e65ns.svg +1 -0
- package/dist/zip-7hqmj0b0.svg +1 -0
- package/m3.config.ts +32 -0
- package/package.json +60 -0
- package/scripts/browser-contract.ts +400 -0
- package/scripts/icons.ts +56 -0
- package/scripts/inventory.ts +86 -0
- package/scripts/shots.ts +154 -0
- package/scripts/tauri.ts +401 -0
- package/src/App.tsx +40 -0
- package/src/adaptive/dpad.ts +223 -0
- package/src/adaptive/window.ts +133 -0
- package/src/api/index.ts +332 -0
- package/src/components/ui.tsx +89 -0
- package/src/env.d.ts +5 -0
- package/src/favicon.svg +1 -0
- package/src/generated/inventory.json +426 -0
- package/src/index.html +16 -0
- package/src/inventory.ts +19 -0
- package/src/main.tsx +6 -0
- package/src/pages/Adaptive.tsx +128 -0
- package/src/pages/Ai.tsx +174 -0
- package/src/pages/Brands.tsx +156 -0
- package/src/pages/Components.tsx +91 -0
- package/src/pages/Design.tsx +163 -0
- package/src/pages/Explorer.tsx +125 -0
- package/src/pages/Forms.tsx +128 -0
- package/src/pages/Icons.tsx +138 -0
- package/src/pages/Motion.tsx +157 -0
- package/src/pages/Next.tsx +107 -0
- package/src/pages/Overview.tsx +105 -0
- package/src/pages/Primitives.tsx +138 -0
- package/src/pages/Reader.tsx +101 -0
- package/src/pages/System.tsx +283 -0
- package/src/pages/Theme.tsx +146 -0
- package/src/pages/index.ts +25 -0
- package/src/router.ts +22 -0
- package/src/shell/Shell.tsx +383 -0
- package/src/shell/nav.ts +198 -0
- package/src/styles.css +61 -0
- package/test/contracts.test.ts +87 -0
- package/test/host-contract.test.ts +183 -0
- package/test/runtime-api.test.ts +138 -0
- package/test-dom/dpad.test.ts +78 -0
- package/tsconfig.json +11 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import{v,k,le,V}from"./chunk-ewtr6sjm.js";import{we,wt}from"./chunk-2pmrsdd5.js";import{G}from"./chunk-ehpz56xv.js";import{x}from"./chunk-616szvb9.js";import{c,M,b,O,C,S,p,L,u,Y,Bt,be,ir,yt,Hr,mr,A,Vt,Lt,W,D,Ye,Co,h,H,Ct,Po,wo,ko,xr,Be,ot,Yt,Kr,Yr,nt,I,N,Ie,Se,me,oe,at,Jr,Mt,_r,it,De,he,Er,Ir,Pr,st,lt,ct,oo,Oo,Xe,It,Ro,Bo,Lo,Do,$r,No,zo,Mo,Fo,Go,ut,Je,Pt,ro}from"./chunk-08yjrfs5.js";import{dt,kt,Ze,Q,ce,f,Ne,a,q,d,i,j,ue,l,o,n,r,te,F,e,t,m,y,z,P}from"./chunk-7tt0cawd.js";import{lo,co,uo}from"./chunk-58a3eq49.js";import{fo,Tt,po,mo,ho}from"./chunk-nn0prq25.js";import{Pe}from"./chunk-vm9edd26.js";import{s,U}from"./chunk-9na12mjw.js";var T1=kt(function(DK,E1){var g1=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,d4=/\n/g,p4=/^\s*/,m4=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,f4=/^:\s*/,h4=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,g4=/^[;\s]*/,b4=/^\s+|\s+$/g,S4=`
|
|
2
|
+
`,b1="/",S1="*",Us="",_4="comment",E4="declaration";function T4(g,_){if(typeof g!=="string")throw TypeError("First argument must be a string");if(!g)return[];_=_||{};var E=1,T=1;function R(ae){var fe=ae.match(d4);if(fe)E+=fe.length;var xe=ae.lastIndexOf(S4);T=~xe?ae.length-xe:T+ae.length}function w(){var ae={line:E,column:T};return function(fe){return fe.position=new B(ae),X(),fe}}function B(ae){this.start=ae,this.end={line:E,column:T},this.source=_.source}B.prototype.content=g;function Z(ae){var fe=Error(_.source+":"+E+":"+T+": "+ae);if(fe.reason=ae,fe.filename=_.source,fe.line=E,fe.column=T,fe.source=g,_.silent);else throw fe}function K(ae){var fe=ae.exec(g);if(!fe)return;var xe=fe[0];return R(xe),g=g.slice(xe.length),fe}function X(){K(p4)}function ee(ae){var fe;ae=ae||[];while(fe=re())if(fe!==!1)ae.push(fe);return ae}function re(){var ae=w();if(b1!=g.charAt(0)||S1!=g.charAt(1))return;var fe=2;while(Us!=g.charAt(fe)&&(S1!=g.charAt(fe)||b1!=g.charAt(fe+1)))++fe;if(fe+=2,Us===g.charAt(fe-1))return Z("End of comment missing");var xe=g.slice(2,fe-2);return T+=2,R(xe),g=g.slice(fe),T+=2,ae({type:_4,comment:xe})}function ie(){var ae=w(),fe=K(m4);if(!fe)return;if(re(),!K(f4))return Z("property missing ':'");var xe=K(h4),Ee=ae({type:E4,property:_1(fe[0].replace(g1,Us)),value:xe?_1(xe[0].replace(g1,Us)):Us});return K(g4),Ee}function se(){var ae=[];ee(ae);var fe;while(fe=ie())if(fe!==!1)ae.push(fe),ee(ae);return ae}return X(),se()}function _1(g){return g?g.replace(b4,Us):Us}E1.exports=T4});var y1=kt(function(ad){var y4=ad&&ad.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(ad,"__esModule",{value:!0});ad.default=x4;var v4=y4(T1());function x4(g,_){let E=null;if(!g||typeof g!=="string")return E;let T=(0,v4.default)(g),R=typeof _==="function";return T.forEach((w)=>{if(w.type!=="declaration")return;let{property:B,value:Z}=w;if(R)_(B,Z,w);else if(Z)E=E||{},E[B]=Z}),E}});var k1=kt(function(x1){Object.defineProperty(x1,"__esModule",{value:!0});x1.camelCase=void 0;var R4=/^--[a-zA-Z0-9_-]+$/,k4=/-([a-z])/g,I4=/^[^-]+$/,C4=/^-(webkit|moz|ms|o|khtml)-/,w4=/^-(ms)-/,A4=function(g){return!g||I4.test(g)||R4.test(g)},P4=function(g,_){return _.toUpperCase()},v1=function(g,_){return"".concat(_,"-")},z4=function(g,_){if(_===void 0)_={};if(A4(g))return g;if(g=g.toLowerCase(),_.reactCompat)g=g.replace(w4,v1);else g=g.replace(C4,v1);return g.replace(k4,P4)};x1.camelCase=z4});var C1=kt(function(B0,I1){var N4=B0&&B0.__importDefault||function(g){return g&&g.__esModule?g:{default:g}},O4=N4(y1()),M4=k1();function F0(g,_){var E={};if(!g||typeof g!=="string")return E;return(0,O4.default)(g,function(T,R){if(T&&R)E[(0,M4.camelCase)(T,_)]=R}),E}F0.default=F0;I1.exports=F0});var Kk=kt(function(One,Wk){var Sf=Object.prototype.hasOwnProperty,Yk=Object.prototype.toString,{defineProperty:Hk,getOwnPropertyDescriptor:qk}=Object,jk=function(_){if(typeof Array.isArray==="function")return Array.isArray(_);return Yk.call(_)==="[object Array]"},Zk=function(_){if(!_||Yk.call(_)!=="[object Object]")return!1;var E=Sf.call(_,"constructor"),T=_.constructor&&_.constructor.prototype&&Sf.call(_.constructor.prototype,"isPrototypeOf");if(_.constructor&&!E&&!T)return!1;var R;for(R in _);return typeof R>"u"||Sf.call(_,R)},Vk=function(_,E){if(Hk&&E.name==="__proto__")Hk(_,E.name,{enumerable:!0,configurable:!0,value:E.newValue,writable:!0});else _[E.name]=E.newValue},Gk=function(_,E){if(E==="__proto__"){if(!Sf.call(_,E))return;else if(qk)return qk(_,E).value}return _[E]};Wk.exports=function g(){var _,E,T,R,w,B,Z=arguments[0],K=1,X=arguments.length,ee=!1;if(typeof Z==="boolean")ee=Z,Z=arguments[1]||{},K=2;if(Z==null||typeof Z!=="object"&&typeof Z!=="function")Z={};for(;K<X;++K)if(_=arguments[K],_!=null){for(E in _)if(T=Gk(Z,E),R=Gk(_,E),Z!==R){if(ee&&R&&(Zk(R)||(w=jk(R)))){if(w)w=!1,B=T&&jk(T)?T:[];else B=T&&Zk(T)?T:{};Vk(Z,{name:E,newValue:g(ee,B,R)})}else if(typeof R<"u")Vk(Z,{name:E,newValue:R})}}return Z}});r();r();r();class mh{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new me,this.restTimeout=new me,this.handleCloseOptions=void 0}static create(){return new mh}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}var cp=new WeakMap;function la(g){if(!g.performedPointerEventsMutation)return;let _=g.pointerEventsScopeElement;if(_&&cp.get(_)===g)g.pointerEventsScopeElement?.style.removeProperty("pointer-events"),g.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),g.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),cp.delete(_);g.performedPointerEventsMutation=!1,g.pointerEventsScopeElement=null,g.pointerEventsReferenceElement=null,g.pointerEventsFloatingElement=null}function lp(g,_){let{scopeElement:E,referenceElement:T,floatingElement:R}=_,w=cp.get(E);if(w&&w!==g)la(w);la(g),g.performedPointerEventsMutation=!0,g.pointerEventsScopeElement=E,g.pointerEventsReferenceElement=T,g.pointerEventsFloatingElement=R,cp.set(E,g),E.style.pointerEvents="none",T.style.pointerEvents="auto",R.style.pointerEvents="auto"}function dp(g){let _=g.context.dataRef.current,E=M(()=>_.hoverInteractionState??mh.create()).current;if(!_.hoverInteractionState)_.hoverInteractionState=E;return Vt(_.hoverInteractionState.disposeEffect),_.hoverInteractionState}function h2(g,_){if(_!=null&&!ot(_))return 0;if(typeof g==="function")return g();return g}function Fu(g,_,E){let T=h2(g,E);if(typeof T==="number")return T;return T?.[_]}function fh(g){if(typeof g==="function")return g();return g}function pp(g,_){return _||g==="click"||g==="mousedown"}function f_(g){return g?.includes("mouse")&&g!=="mousedown"}function h_(g,_={}){let{enabled:E=!0,closeDelay:T=0,nodeId:R}=_,w="rootStore"in g?g.rootStore:g,B=w.useState("open"),Z=w.useState("floatingElement"),K=w.useState("domReferenceElement"),{dataRef:X}=w.context,ee=he(),re=De(),ie=dp(w),se=oe(),ae=u(()=>pp(X.current.openEvent?.type,ie.interactedInside)),fe=u(()=>f_(X.current.openEvent?.type)),xe=u(()=>{la(ie)});c(()=>{if(!B)ie.pointerType=void 0,ie.restTimeoutPending=!1,ie.interactedInside=!1,xe()},[B,ie,xe]),i(()=>xe,[xe]),c(()=>{if(!E)return;if(B&&ie.handleCloseOptions?.blockPointerEvents&&fe()&&b(K)&&Z){let Ee=K,Ae=Z,Re=C(Z),Ve=ee?.nodesRef.current.find((pt)=>pt.id===re)?.context?.elements.floating;if(Ve)Ve.style.pointerEvents="";let Ge=ie.pointerEventsScopeElement!==Ae?ie.pointerEventsScopeElement:null,ke=Ve!==Ae?Ve:null,qe=ie.handleCloseOptions?.getScope?.()??Ge??ke??Ee.closest("[data-rootownerid]")??Re.body;return lp(ie,{scopeElement:qe,referenceElement:Ee,floatingElement:Ae}),()=>{xe()}}return},[E,B,K,Z,ie,fe,ee,re,xe]),i(()=>{if(!E)return;function Ee(){return!!(ee&&re&&Be(ee.nodesRef.current,re).length>0)}function Ae(pt){let ht=Fu(T,"close",ie.pointerType),Oe=()=>{w.setOpen(!1,A(be,pt)),ee?.events.emit("floating.closed",pt)};if(ht)ie.openChangeTimeout.start(ht,Oe);else ie.openChangeTimeout.clear(),Oe()}function Re(pt){let ht=H(pt);if(!xr(ht)){ie.interactedInside=!1;return}ie.interactedInside=ht?.closest("[aria-haspopup]")!=null}function Ve(){ie.openChangeTimeout.clear(),se.clear(),ee?.events.off("floating.closed",ke),xe()}function Ge(pt){if(Ee()&&ee){ee.events.on("floating.closed",ke);return}if(ko(pt.relatedTarget,w.context.triggerElements))return;let ht=X.current.floatingContext?.nodeId??R,Oe=pt.relatedTarget;if(ee&&ht&&b(Oe)&&Be(ee.nodesRef.current,ht,!1).some((Nt)=>h(Nt.context?.elements.floating,Oe)))return;if(ie.handler){ie.handler(pt);return}if(xe(),fe()&&!ae())Ae(pt)}function ke(pt){if(!ee||!re||Ee())return;se.start(0,()=>{ee.events.off("floating.closed",ke),w.setOpen(!1,A(be,pt)),ee.events.emit("floating.closed",pt)})}let qe=Z;return Se(qe&&I(qe,"mouseenter",Ve),qe&&I(qe,"mouseleave",Ge),qe&&I(qe,"pointerdown",Re,!0),()=>{ee?.events.off("floating.closed",ke)})},[E,Z,w,X,T,R,fe,ae,xe,ie,ee,re,se])}r();var g2={current:null};function b_(g,_={}){let{enabled:E=!0,delay:T=0,handleClose:R=null,mouseOnly:w=!1,restMs:B=0,move:Z=!0,triggerElementRef:K=g2,externalTree:X,isActiveTrigger:ee=!0,getHandleCloseContext:re,isClosing:ie,shouldOpen:se,guardStaleOpen:ae=!1}=_,fe="rootStore"in g?g.rootStore:g,{dataRef:xe,events:Ee}=fe.context,Ae=he(X),Re=dp(fe),Ve=o(!1),Ge=N(R),ke=N(T),qe=N(B),pt=N(E),ht=N(se),Oe=N(ie),Rt=u(()=>pp(xe.current.openEvent?.type,Re.interactedInside)),Nt=u(()=>ht.current?.()!==!1),mt=u((At,Et,jt)=>{let Ut=fe.context.triggerElements;if(Ut.hasElement(Et))return!At||!h(At,Et);if(!b(jt))return!1;let ye=jt;return Ut.hasMatchingElement((on)=>h(on,ye))&&(!At||!h(At,ye))}),_t=u(()=>{if(!Re.handler)return;C(fe.select("domReferenceElement")).removeEventListener("mousemove",Re.handler),Re.handler=void 0}),We=u(()=>{la(Re)});if(ee)Re.handleCloseOptions=R?.__options;return i(()=>_t,[_t]),i(()=>{if(!E)return;function At(Et){if(!Et.open)Ve.current=Et.reason===be,_t(),Re.openChangeTimeout.clear(),Re.restTimeout.clear(),Re.blockMouseMove=!0,Re.restTimeoutPending=!1;else Ve.current=!1}return Ee.on("openchange",At),()=>{Ee.off("openchange",At)}},[E,Ee,Re,_t]),i(()=>{if(!E)return;function At(qt,ve=!0){let tn=Fu(ke.current,"close",Re.pointerType);if(tn)Re.openChangeTimeout.start(tn,()=>{fe.setOpen(!1,A(be,qt)),Ae?.events.emit("floating.closed",qt)});else if(ve)Re.openChangeTimeout.clear(),fe.setOpen(!1,A(be,qt)),Ae?.events.emit("floating.closed",qt)}let Et=K.current??(ee?fe.select("domReferenceElement"):null);if(!b(Et))return;function jt(qt){if(Re.openChangeTimeout.clear(),Re.blockMouseMove=!1,w&&!ot(Re.pointerType))return;let ve=fh(qe.current),tn=Fu(ke.current,"open",Re.pointerType),nn=H(qt),$t=qt.currentTarget??null,Kt=fe.select("domReferenceElement"),Wt=$t;if(b(nn)&&!fe.context.triggerElements.hasElement(nn)){for(let _o of fe.context.triggerElements.elements())if(h(_o,nn)){Wt=_o;break}}if(b($t)&&b(Kt)&&!fe.context.triggerElements.hasElement($t)&&h($t,Kt))Wt=Kt;let bn=Wt==null?!1:mt(Kt,Wt,nn),cn=fe.select("open"),un=Oe.current?.()??fe.select("transitionStatus")==="ending",Tn=!cn&&un&&Ve.current,_n=!bn&&b(Wt)&&b(Kt)&&h(Kt,Wt)&&Tn,sn=ve>0&&!tn,yn=bn&&(cn||Tn)||_n,Br=!cn||bn;if(yn){if(Nt())fe.setOpen(!0,A(be,qt,Wt));return}if(sn)return;if(tn)Re.openChangeTimeout.start(tn,()=>{if(Br&&Nt())fe.setOpen(!0,A(be,qt,Wt))});else if(Br){if(Nt())fe.setOpen(!0,A(be,qt,Wt))}}function Ut(qt){if(Rt()){We();return}_t();let ve=fe.select("domReferenceElement"),tn=C(ve);Re.restTimeout.clear(),Re.restTimeoutPending=!1;let nn=xe.current.floatingContext??re?.();if(ko(qt.relatedTarget,fe.context.triggerElements))return;if(Ge.current&&nn){if(!fe.select("open"))Re.openChangeTimeout.clear();let Kt=K.current;Re.handler=Ge.current({...nn,tree:Ae,x:qt.clientX,y:qt.clientY,onClose(){if(We(),_t(),pt.current&&!Rt()&&Kt===fe.select("domReferenceElement"))At(qt,!0)}}),tn.addEventListener("mousemove",Re.handler),Re.handler(qt);return}if(Re.pointerType==="touch"?!h(fe.select("floatingElement"),qt.relatedTarget):!0)At(qt)}function ye(qt){if(h(Et,qt.relatedTarget))return;Re.openChangeTimeout.clear(),Re.restTimeout.clear(),Re.restTimeoutPending=!1}let on=ae?I(Et,"mouseout",ye):void 0;if(Z)return Se(I(Et,"mousemove",jt,{once:!0}),I(Et,"mouseenter",jt),I(Et,"mouseleave",Ut),on);return Se(I(Et,"mouseenter",jt),I(Et,"mouseleave",Ut),on)},[_t,We,xe,ke,fe,E,Ge,Re,ee,mt,Rt,w,Z,qe,K,Ae,pt,re,Oe,Nt,ae]),l(()=>{if(!E)return;function At(Et){Re.pointerType=Et.pointerType}return{onPointerDown:At,onPointerEnter:At,onMouseMove(Et){let{nativeEvent:jt}=Et,Ut=Et.currentTarget,ye=fe.select("domReferenceElement"),on=fe.select("open"),qt=mt(ye,Ut,Et.target);if(w&&!ot(Re.pointerType))return;if(on&&qt&&Re.handleCloseOptions?.blockPointerEvents){let nn=fe.select("floatingElement");if(nn){let $t=Re.handleCloseOptions?.getScope?.()??Ut.ownerDocument.body;lp(Re,{scopeElement:$t,referenceElement:Ut,floatingElement:nn})}}let ve=fh(qe.current);if(on&&!qt||ve===0)return;if(!qt&&Re.restTimeoutPending&&Et.movementX**2+Et.movementY**2<2)return;Re.restTimeout.clear();function tn(){if(Re.restTimeoutPending=!1,Rt())return;let nn=fe.select("open");if(!Re.blockMouseMove&&(!nn||qt)&&Nt())fe.setOpen(!0,A(be,jt,Ut))}if(Re.pointerType==="touch")te(()=>{tn()});else if(qt&&on)tn();else Re.restTimeoutPending=!0,Re.restTimeout.start(ve,tn)}}},[E,Re,Rt,mt,w,fe,qe,Nt])}var S_=0.1,b2=S_*S_,vn=0.5;function mp(g,_,E,T,R,w){return T>=_!==w>=_&&g<=(R-E)*(_-T)/(w-T)+E}function fp(g,_,E,T,R,w,B,Z,K,X){let ee=!1;if(mp(g,_,E,T,R,w))ee=!ee;if(mp(g,_,R,w,B,Z))ee=!ee;if(mp(g,_,B,Z,K,X))ee=!ee;if(mp(g,_,K,X,E,T))ee=!ee;return ee}function S2(g,_,E){return g>=E.x&&g<=E.x+E.width&&_>=E.y&&_<=E.y+E.height}function hp(g,_,E,T,R,w){let B=Math.min(E,R),Z=Math.max(E,R),K=Math.min(T,w),X=Math.max(T,w);return g>=B&&g<=Z&&_>=K&&_<=X}function __(g={}){let{blockPointerEvents:_=!1}=g,E=new me,T=({x:R,y:w,placement:B,elements:Z,onClose:K,nodeId:X,tree:ee})=>{let re=B?.split("-")[0],ie=!1,se=null,ae=null,fe=typeof performance<"u"?performance.now():0;function xe(Ae,Re){let Ve=performance.now(),Ge=Ve-fe;if(se===null||ae===null||Ge===0)return se=Ae,ae=Re,fe=Ve,!1;let ke=Ae-se,qe=Re-ae,pt=ke*ke+qe*qe,ht=Ge*Ge*b2;return se=Ae,ae=Re,fe=Ve,pt<ht}function Ee(){E.clear(),K()}return function(Re){E.clear();let{domReference:Ve,floating:Ge}=Z;if(!Ve||!Ge||re==null||R==null||w==null)return;let{clientX:ke,clientY:qe}=Re,pt=H(Re),ht=Re.type==="mouseleave",Oe=h(Ge,pt),Rt=h(Ve,pt);if(Oe){if(ie=!0,!ht)return}if(Rt){if(ie=!1,!ht){ie=!0;return}}if(ht&&b(Re.relatedTarget)&&h(Ge,Re.relatedTarget))return;function Nt(){return Boolean(ee&&Be(ee.nodesRef.current,X).length>0)}function mt(){if(!Nt())Ee()}if(Nt())return;let _t=Ve.getBoundingClientRect(),We=Ge.getBoundingClientRect(),At=R>We.right-We.width/2,Et=w>We.bottom-We.height/2,jt=We.width>_t.width,Ut=We.height>_t.height,ye=(jt?_t:We).left,on=(jt?_t:We).right,qt=(Ut?_t:We).top,ve=(Ut?_t:We).bottom;if(re==="top"&&w>=_t.bottom-1||re==="bottom"&&w<=_t.top+1||re==="left"&&R>=_t.right-1||re==="right"&&R<=_t.left+1){mt();return}let tn=!1;switch(re){case"top":tn=hp(ke,qe,ye,_t.top+1,on,We.bottom-1);break;case"bottom":tn=hp(ke,qe,ye,We.top+1,on,_t.bottom-1);break;case"left":tn=hp(ke,qe,We.right-1,ve,_t.left+1,qt);break;case"right":tn=hp(ke,qe,_t.right-1,ve,We.left+1,qt);break;default:}if(tn)return;if(ie&&!S2(ke,qe,_t)){mt();return}if(!ht&&xe(ke,qe)){mt();return}let nn=!1;switch(re){case"top":{let $t=jt?vn/2:vn*4,Kt=jt?R+$t:At?R+$t:R-$t,Wt=jt?R-$t:At?R+$t:R-$t,bn=w+vn+1,cn=At?We.bottom-vn:jt?We.bottom-vn:We.top,un=At?jt?We.bottom-vn:We.top:We.bottom-vn;nn=fp(ke,qe,Kt,bn,Wt,bn,We.left,cn,We.right,un);break}case"bottom":{let $t=jt?vn/2:vn*4,Kt=jt?R+$t:At?R+$t:R-$t,Wt=jt?R-$t:At?R+$t:R-$t,bn=w-vn,cn=At?We.top+vn:jt?We.top+vn:We.bottom,un=At?jt?We.top+vn:We.bottom:We.top+vn;nn=fp(ke,qe,Kt,bn,Wt,bn,We.left,cn,We.right,un);break}case"left":{let $t=Ut?vn/2:vn*4,Kt=Ut?w+$t:Et?w+$t:w-$t,Wt=Ut?w-$t:Et?w+$t:w-$t,bn=R+vn+1,cn=Et?We.right-vn:Ut?We.right-vn:We.left,un=Et?Ut?We.right-vn:We.left:We.right-vn;nn=fp(ke,qe,cn,We.top,un,We.bottom,bn,Kt,bn,Wt);break}case"right":{let $t=Ut?vn/2:vn*4,Kt=Ut?w+$t:Et?w+$t:w-$t,Wt=Ut?w-$t:Et?w+$t:w-$t,bn=R-vn,cn=Et?We.left+vn:Ut?We.left+vn:We.right,un=Et?Ut?We.left+vn:We.right:We.left+vn;nn=fp(ke,qe,bn,Kt,bn,Wt,cn,We.top,un,We.bottom);break}default:}if(!nn)mt();else if(!ie)E.start(40,mt);return}};return T.__options={...g,blockPointerEvents:_},T}function Hu(g){let _=Object.values(g).filter((T)=>typeof T==="number");return Object.entries(g).filter(([T,R])=>_.indexOf(+T)===-1).map(([T,R])=>R)}function gh(g,_="|"){return g.map((E)=>_h(E)).join(_)}function qu(g,_){if(typeof _==="bigint")return _.toString();return _}class T_{constructor(g){this._getter=g,this._value=void 0}get value(){let g=this._getter;if(g!==void 0)this._value=g(),this._getter=void 0;return this._value}}function ju(g){return new T_(g)}function y_(g){return g===null||g===void 0}function gp(g){let _=g.startsWith("^")?1:0,E=g.endsWith("$")?g.length-1:g.length;return g.slice(_,E)}function v_(g,_){let E=g/_,T=Math.round(E),R=4*Number.EPSILON*Math.max(Math.abs(E),1);if(Math.abs(E-T)<R)return 0;return E-T}var E_=Symbol("evaluating");function x_(g,_,E){let T=void 0;Object.defineProperty(g,_,{get(){if(T===E_)return;if(T===void 0)T=E_,T=E();return T},set(R){Object.defineProperty(g,_,{value:R})},configurable:!0})}function Vr(g,_,E){Object.defineProperty(g,_,{value:E,writable:!0,enumerable:!0,configurable:!0})}function Zu(g){let _=Object.getOwnPropertyDescriptor(g,"shape");return _?.get?_.get.raw:_?.value}function ii(g){return Zu(g._zod.def)??g._zod.def.shape}function R_(g,_,E){Object.defineProperty(g,_,{get(){let T=E();return Vr(this,_,T),T},enumerable:!0,configurable:!0})}function k_(g,_,E){if(_ in g)Vr(g,_,E);else g[_]=E}function gs(g,_,E,T){let R=ii(_);for(let w of E){let B=Object.getOwnPropertyDescriptor(R,w);if(!B.enumerable)continue;if(B.get)R_(g,w,()=>{let Z=_._zod.def.shape[w];return T?T(Z,w):Z});else k_(g,w,T?T(B.value,w):B.value)}}function _2(g,_){for(let E of Reflect.ownKeys(_)){let T=Object.getOwnPropertyDescriptor(_,E);if(!T.enumerable)continue;if(T.get)R_(g,E,()=>_[E]);else k_(g,E,T.value)}}function Gr(...g){let _={};for(let E of g){let T=Object.getOwnPropertyDescriptors(E);Object.assign(_,T)}return Object.defineProperties({},_)}function I_(g){return JSON.stringify(g)}function C_(g){return g.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var bh="captureStackTrace"in Error?Error.captureStackTrace:(...g)=>{};function da(g){return typeof g==="object"&&g!==null&&!Array.isArray(g)}var w_=ju(()=>{if(Mr.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(g){return!1}});function bs(g){if(da(g)===!1)return!1;let _=g.constructor;if(_===void 0)return!0;if(typeof _!=="function")return!0;let E=_.prototype;if(da(E)===!1)return!1;if(Object.prototype.hasOwnProperty.call(E,"isPrototypeOf")===!1)return!1;return!0}function Sh(g){if(bs(g))return{...g};if(Array.isArray(g))return[...g];if(g instanceof Map)return new Map(g);if(g instanceof Set)return new Set(g);return g}var A_=new Set(["string","number","symbol"]);function Mi(g){return g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yo(g,_,E){let T=new g._zod.constr(_??g._zod.def);if(!_||E?.parent)T._zod.parent=g;return T}function zt(g){let _=g;if(!_)return{};if(typeof _==="string")return{error:()=>_};if(_?.message!==void 0){if(_?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");_.error=_.message}if(delete _.message,typeof _.error==="string")return{..._,error:()=>_.error};return _}function _h(g){if(typeof g==="bigint")return g.toString()+"n";if(typeof g==="string")return`"${g}"`;return`${g}`}function P_(g){return Object.keys(g).filter((_)=>g[_]._zod.optin!==void 0&&g[_]._zod.optout==="optional")}var bp=(()=>({safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}))(),Eh={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function E2(g,_){let E=g._zod.def,T=E.checks;if(T&&T.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let w={};return gs(w,g,Sp(g,_)),yo(g,Gr(E,{shape:w,checks:[]}))}function Sp(g,_){let E=ii(g),T=[];for(let R of Reflect.ownKeys(_)){if(!Object.getOwnPropertyDescriptor(E,R)?.enumerable)throw Error(`Unrecognized key: "${String(R)}"`);if(_[R])T.push(R)}return T}function T2(g,_){let E=g._zod.def,T=E.checks;if(T&&T.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let w=new Set(Sp(g,_)),B={};return gs(B,g,Reflect.ownKeys(ii(g)).filter((Z)=>!w.has(Z))),yo(g,Gr(E,{shape:B,checks:[]}))}function y2(g,_){if(!bs(_))throw Error("Invalid input to extend: expected a plain object");let E=g._zod.def.checks;if(E&&E.length>0){let R=ii(g);for(let w of Reflect.ownKeys(_))if(Object.getOwnPropertyDescriptor(R,w)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return yo(g,Gr(g._zod.def,{shape:z_(g,_)}))}function z_(g,_){let E={};return gs(E,g,Reflect.ownKeys(ii(g))),_2(E,_),E}function v2(g,_){if(!bs(_))throw Error("Invalid input to safeExtend: expected a plain object");return yo(g,Gr(g._zod.def,{shape:z_(g,_)}))}function x2(g,_){if(!_?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(g._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let E={};gs(E,g,Reflect.ownKeys(ii(g))),gs(E,_,Reflect.ownKeys(ii(_)));let T=Gr(g._zod.def,{shape:E,get catchall(){return _._zod.def.catchall},checks:_._zod.def.checks??[]});return yo(g,T)}function N_(g,_,E,T="partial"){let w=_._zod.def.checks;if(w&&w.length>0)throw Error(`.${T}() cannot be used on object schemas containing refinements`);let Z=E?new Set(Sp(_,E)):void 0,K={};return gs(K,_,Reflect.ownKeys(ii(_)),g&&((X,ee)=>Z&&!Z.has(ee)?X:new g({type:"optional",innerType:X}))),yo(_,Gr(_._zod.def,{shape:K,checks:[]}))}function R2(g,_,E){let T=E?new Set(Sp(_,E)):void 0,R={};return gs(R,_,Reflect.ownKeys(ii(_)),(w,B)=>T&&!T.has(B)?w:new g({type:"nonoptional",innerType:w})),yo(_,Gr(_._zod.def,{shape:R}))}function Ho(g,_=0){if(g.aborted===!0)return!0;for(let E=_;E<g.issues.length;E++)if(g.issues[E]?.continue!==!0)return!0;return!1}function O_(g,_=0){if(g.aborted===!0)return!0;for(let E=_;E<g.issues.length;E++)if(g.issues[E]?.continue===!1)return!0;return!1}function Li(g,_){return _.map((E)=>{var T;return(T=E).path??(T.path=[]),E.path.unshift(g),E})}function Bu(g){return typeof g==="string"?g:g?.message}function Th(g,_,E){var T;for(let R=_;R<g.length;R++)(T=g[R]).schema??(T.schema=E)}function qo(g,_,E){var T;let R=g.inst?._zod?.traits;if(R?.has("$ZodType"))if(R.has("$ZodCheck"))(T=g).schema??(T.schema=g.inst);else g.schema=g.inst;let w=g.schema!==g.inst?g.schema?._zod.def?.error:void 0,B=g.message?g.message:Bu(g.inst?._zod.def?.error?.(g))??Bu(w?.(g))??Bu(_?.error?.(g))??Bu(E.customError?.(g))??Bu(E.localeError?.(g))??"Invalid input",Z={};for(let K of Object.keys(g)){if(K==="inst"||K==="schema"||K==="continue"||K==="input"||K==="__proto__")continue;Z[K]=g[K]}if(Z.path??(Z.path=[]),Z.message=B,_?.reportInput)Z.input=g.input;return Z}var k2=/[\uD800-\uDBFF]/;function _p(g){let _=g.length;if(!k2.test(g))return _;let E=_;for(let T=0;T<_-1;T++)if((g.charCodeAt(T)&64512)===55296&&(g.charCodeAt(T+1)&64512)===56320)E--,T++;return E}function Ep(g){if(Array.isArray(g))return"array";if(typeof g==="string")return"string";return"unknown"}function M_(g){let _=typeof g;switch(_){case"number":return Number.isNaN(g)?"nan":"number";case"object":{if(g===null)return"null";if(Array.isArray(g))return"array";let E=g;if(E&&Object.getPrototypeOf(E)!==Object.prototype&&"constructor"in E&&E.constructor)return E.constructor.name}}return _}function Ss(...g){let[_,E,T]=g;if(typeof _==="string")return{message:_,code:"custom",input:E,inst:T};return{..._}}function L_(g,_){for(let E in _){let T=Object.getOwnPropertyDescriptor(_,E);if(T.get)Object.defineProperty(g,E,{...T,enumerable:!1});else I2(g,E,T.value)}}function si(g,_,E,T=!0){return Object.defineProperty(g,_,{configurable:!0,writable:!0,enumerable:T,value:E}),E}function Tp(g,_,E){return si(g,_,E,!1)}function D_(g,_){for(let E in g){let T=g[E];Object.defineProperty(_,E,{configurable:!0,enumerable:!0,get(){return si(this,E,T(this))},set(R){si(this,E,R)}})}return _}function I2(g,_,E){Object.defineProperty(g,_,{configurable:!0,get(){return this==null?E:si(this,_,E.bind(this))},set(T){si(this,_,T)}})}function C2(g,_){let E=Object.getPrototypeOf(g);return _ in E?void 0:E}var hh,Oi=!1,w2={configurable:!0,get(){Oi=!0;return}};function mn(g,_,E){let T=Object.getPrototypeOf(g._zod);if(_ in T&&hh!==g._zod){hh=void 0;return}hh=g._zod,Object.defineProperty(T,_,{configurable:!0,get(){Object.defineProperty(this,_,w2);let R=Oi;Oi=!1;try{let w=E(this);if(Oi)delete this[_];else Object.defineProperty(this,_,{configurable:!0,writable:!0,value:w});return Oi=Oi||R,w}catch(w){throw delete this[_],Oi=Oi||R,w}},set(R){Object.defineProperty(this,_,{configurable:!0,writable:!0,value:R})}})}function A2(g,_,E,T){let R=C2(g,_);if(!R)return;Object.defineProperty(R,_,{configurable:!0,get(){let w={configurable:!0,writable:!0,enumerable:T,value:void 0};return Object.defineProperty(this,_,w),w.value=E(this),Object.defineProperty(this,_,w),w.value},set(w){Object.defineProperty(this,_,{configurable:!0,writable:!0,enumerable:T,value:w})}})}var P2="~constantCatch";function $_(g){let _=()=>g;return _[P2]=!0,_}var U_,vh=Object.freeze({status:"aborted"}),yh={value:void 0,enumerable:!1},F_="captureStackTrace"in Error?Error:null;function z2(g){let _=F_;if(_){let E=_.stackTraceLimit;if(typeof E==="number"){try{_.stackTraceLimit=0}catch{return F_=null,new g}try{return new g}finally{_.stackTraceLimit=E}}}return new g}function $e(g,_,E,T){let R={};function w(ie){this.def=ie,this.constr=re,this.traits=new Set}w.prototype=R;let B=E,Z=B&&new WeakSet;function K(ie,se){if(!ie._zod){yh.value=new w(se);try{Object.defineProperty(ie,"_zod",yh)}finally{yh.value=void 0}}else if(ie._zod.traits.has(g))return;if(ie._zod.traits.add(g),_(ie,se),Z){let fe=Object.getPrototypeOf(ie),xe=ie._zod.constr.prototype,Ee=fe;while(Ee&&Ee!==xe)Ee=Object.getPrototypeOf(Ee);let Ae=Ee??fe;if(!Z.has(Ae))Z.add(Ae),L_(Ae,B)}let ae=re.prototype;for(let fe in ae){if(!Object.prototype.hasOwnProperty.call(ae,fe))continue;if(!(fe in ie))ie[fe]=ae[fe].bind(ie)}}let X=T?.Parent??Object;class ee extends X{}Object.defineProperty(ee,"name",{value:g});function re(ie){let se=T?.Parent?z2(ee):this;K(se,ie);let ae=se._zod.deferred;if(ae){for(let xe of ae)xe();se._zod.deferred=void 0}let fe=globalThis.__zod_globalConfig?.postProcessor;if(fe)fe(se);return se}return Object.defineProperty(re,"init",{value:K}),Object.defineProperty(re,Symbol.hasInstance,{value:(ie)=>{if(T?.Parent&&ie instanceof T.Parent)return!0;return ie?._zod?.traits?.has(g)}}),Object.defineProperty(re,"name",{value:g}),re}class jo extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Vu extends Error{constructor(g){super(`Encountered unidirectional transform during encode: ${g}`);this.name="ZodEncodeError"}}(U_=globalThis).__zod_globalConfig??(U_.__zod_globalConfig={});var Mr=globalThis.__zod_globalConfig;function Lr(g){if(g)Object.assign(Mr,g);return Mr}function N2(){let g=this._zod;return g.message??(g.message=JSON.stringify(g.def,qu,2)),g.message}function O2(g){this._zod.message=g}var M2={get:N2,set:O2,enumerable:!0,configurable:!0},Rh={value:void 0,enumerable:!1},B_=new WeakSet([Object.prototype,Error.prototype]),H_=(g,_)=>{g.name="$ZodError",Rh.value=_,Object.defineProperty(g,"issues",Rh),Rh.value=void 0,Object.defineProperty(g,"message",M2);let E=Object.getPrototypeOf(g);if(!B_.has(E))B_.add(E),Object.defineProperty(E,"toString",{configurable:!0,enumerable:!1,get(){let T=()=>this.message;return Object.defineProperty(this,"toString",{value:T,configurable:!0,writable:!0}),T},set(T){Object.defineProperty(this,"toString",{value:T,configurable:!0,writable:!0})}})},q_=$e("$ZodError",H_),_q=$e("$ZodError",H_,void 0,{Parent:Error});function L2(g,_,E){if(!Object.prototype.hasOwnProperty.call(g,_))if(_==="__proto__")Object.defineProperty(g,_,{value:E(),writable:!0,enumerable:!0,configurable:!0});else g[_]=E();return g[_]}function kh(g,_=(E)=>E.message){let E={},T=[];for(let R of g.issues)if(R.path.length>0)L2(E,R.path[0],()=>[]).push(_(R));else T.push(_(R));return{formErrors:T,fieldErrors:E}}function Ih(g,_=(E)=>E.message){let E={_errors:[]},T=(R,w=[])=>{for(let B of R.issues)if(B.code==="invalid_union"&&B.errors.length)B.errors.map((Z)=>T({issues:Z},[...w,...B.path]));else if(B.code==="invalid_key")T({issues:B.issues},[...w,...B.path]);else if(B.code==="invalid_element")T({issues:B.issues},[...w,...B.path]);else{let Z=[...w,...B.path];if(Z.length===0)E._errors.push(_(B));else{let K=E,X=0;while(X<Z.length){let ee=Z[X],re=X===Z.length-1;if(ee==="_errors"){if(re)K._errors.push(_(B));X++;continue}if(!Object.prototype.hasOwnProperty.call(K,ee))Object.defineProperty(K,ee,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let ie=K[ee];if(re)ie._errors.push(_(B));K=ie,X++}}}};return T(g),E}function yp(g,_){return{callee:_?.callee??g,Err:_?.Err}}var vp=(g)=>{let _=(E,T,R,w)=>{let B=R?{...R,async:!1}:{async:!1},Z=E._zod.run({value:T,issues:[]},B);if(Z instanceof Promise)throw new jo;if(Z.issues.length){let K=new(w?.Err??g)(Z.issues.map((X)=>qo(X,B,Lr())));throw bh(K,w?.callee??_),K}return Z.value};return _};var xp=(g)=>{let _=async(E,T,R,w)=>{let B=R?{...R,async:!0}:{async:!0},Z=E._zod.run({value:T,issues:[]},B);if(Z instanceof Promise)Z=await Z;if(Z.issues.length){let K=new(w?.Err??g)(Z.issues.map((X)=>qo(X,B,Lr())));throw bh(K,w?.callee??_),K}return Z.value};return _};var Rp=(g)=>(_,E,T)=>{let R=T?{...T,async:!1}:{async:!1},w=_._zod.run({value:E,issues:[]},R);if(w instanceof Promise)throw new jo;return w.issues.length?j_(g,w.issues,R):{success:!0,data:w.value}};function j_(g,_,E){let T;return{success:!1,get error(){if(!T)T=new g(_.map((R)=>qo(R,E,Lr()))),_=void 0,E=void 0;return T},set error(R){T=R,_=void 0,E=void 0}}}var kp=(g)=>async(_,E,T)=>{let R=T?{...T,async:!0}:{async:!0},w=_._zod.run({value:E,issues:[]},R);if(w instanceof Promise)w=await w;return w.issues.length?j_(g,w.issues,R):{success:!0,data:w.value}};var D2=Symbol.for("zod.compile.invalid"),$2=Symbol.for("zod.compile.fallback"),Ch=(g,_,E)=>{let T=g._zod.bag.validator;if(T!==void 0){if(T(_)!==D2)return!0;if(T.definite===!0&&E===void 0)return!1}return U2(g,_,E)};function U2(g,_,E){let T=E?{...E,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},R=g._zod.bag.fallbackRun,w;if(R)T[$2]=!0,w=R({value:_,issues:[]},T);else w=g._zod.run({value:_,issues:[]},T);if(w instanceof Promise)throw new jo;return w.issues.length===0}var wh=async(g,_,E)=>{let T=E?{...E,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},R=g._zod.run({value:_,issues:[]},T);if(R instanceof Promise)R=await R;return R.issues.length===0},Z_=(g)=>{let _=vp(g),E=(T,R,w,B)=>{let Z=w?{...w,direction:"backward"}:{direction:"backward"};return _(T,R,Z,yp(E,B))};return E};var V_=(g)=>{let _=vp(g),E=(T,R,w,B)=>_(T,R,w,yp(E,B));return E};var G_=(g)=>{let _=xp(g),E=async(T,R,w,B)=>{let Z=w?{...w,direction:"backward"}:{direction:"backward"};return await _(T,R,Z,yp(E,B))};return E};var Y_=(g)=>{let _=xp(g),E=async(T,R,w,B)=>await _(T,R,w,yp(E,B));return E};var W_=(g)=>(_,E,T)=>{let R=T?{...T,direction:"backward"}:{direction:"backward"};return Rp(g)(_,E,R)};var K_=(g)=>(_,E,T)=>Rp(g)(_,E,T);var J_=(g)=>async(_,E,T)=>{let R=T?{...T,direction:"backward"}:{direction:"backward"};return kp(g)(_,E,R)};var X_=(g)=>async(_,E,T)=>kp(g)(_,E,T);var Q_=/^[cC][0-9a-z]{6,}$/,eE=/^[0-9a-z]+$/,tE=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,nE=/^[0-9a-vA-V]{20}$/,rE=/^[A-Za-z0-9]{27}$/,oE=/^[a-zA-Z0-9_-]{21}$/;function iE(g){return new RegExp(`^[a-zA-Z0-9_-]{${g}}$`)}var sE=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var aE=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ph=(g)=>{if(!g)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${g}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var uE=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var F2="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function cE(){return new RegExp(F2,"u")}var lE=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,dE=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;var pE=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,mE=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,fE=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,hE=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/;var gE=/^https?$/,bE=/^\+[1-9]\d{6,14}$/;var SE="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function B2(g){return new RegExp(`^${g}$`)}var _E=B2(SE);function Ah(g){return typeof g.precision==="number"?g.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":g.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${g.precision}}`:g.seconds?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?":"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function EE(g){return new RegExp(`^${Ah(g)}$`)}function TE(g){let _=["Z"];if(g.offset)_.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let E=`${Ah({precision:g.precision,seconds:!0})}(?:${_.join("|")})`,T=g.local?`${E}|${Ah({precision:g.precision})}`:E;return new RegExp(`^${SE}T(?:${T})$`)}var yE=/^[\s\S]{0,}$/;var zh=/^-?\d+$/,Gu=/^-?\d+(?:\.\d+)?$/,vE=/^(?:true|false)$/i,xE=/^null$/i;var RE=/^undefined$/i;var kE=/^[^A-Z]*$/,IE=/^[^a-z]*$/;var rr=$e("$ZodCheck",(g,_)=>{var E;g._zod??(g._zod={}),g._zod.def=_,(E=g._zod).onattach??(E.onattach=[])});var Nh=(g)=>{let _=g.value;return!y_(_)&&_.length!==void 0},Ip={number:"number",bigint:"bigint",object:"date"},Oh=$e("$ZodCheckLessThan",(g,_)=>{rr.init(g,_);let E=Ip[typeof _.value];g._zod.check=(T)=>{if(_.inclusive?T.value<=_.value:T.value<_.value)return;T.issues.push({origin:Ip[typeof T.value]??E,code:"too_big",maximum:typeof _.value==="object"?_.value.getTime():_.value,input:T.value,inclusive:_.inclusive,inst:g,continue:!_.abort})}}),Mh=$e("$ZodCheckGreaterThan",(g,_)=>{rr.init(g,_);let E=Ip[typeof _.value];g._zod.check=(T)=>{if(_.inclusive?T.value>=_.value:T.value>_.value)return;T.issues.push({origin:Ip[typeof T.value]??E,code:"too_small",minimum:typeof _.value==="object"?_.value.getTime():_.value,input:T.value,inclusive:_.inclusive,inst:g,continue:!_.abort})}}),CE=$e("$ZodCheckMultipleOf",(g,_)=>{rr.init(g,_),g._zod.check=(E)=>{if(typeof E.value!==typeof _.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof E.value==="bigint"?_.value!==BigInt(0)&&E.value%_.value===BigInt(0):v_(E.value,_.value)===0)return;E.issues.push({origin:typeof E.value,code:"not_multiple_of",divisor:_.value,input:E.value,inst:g,continue:!_.abort})}}),wE=$e("$ZodCheckNumberFormat",(g,_)=>{rr.init(g,_),_.format=_.format||"float64";let E=_.format?.includes("int"),T=E?"int":"number",[R,w]=bp[_.format];g._zod.check=(B)=>{let Z=B.value;if(E){if(!Number.isInteger(Z)){B.issues.push({expected:T,format:_.format,code:"invalid_type",continue:!1,input:Z,inst:g});return}if(!Number.isSafeInteger(Z)){if(Z>0)B.issues.push({input:Z,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:g,origin:T,inclusive:!0,continue:!_.abort});else B.issues.push({input:Z,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:g,origin:T,inclusive:!0,continue:!_.abort});return}}if(Z<R)B.issues.push({origin:"number",input:Z,code:"too_small",minimum:R,inclusive:!0,inst:g,continue:!_.abort});if(Z>w)B.issues.push({origin:"number",input:Z,code:"too_big",maximum:w,inclusive:!0,inst:g,continue:!_.abort})}});var AE=$e("$ZodCheckMaxLength",(g,_)=>{var E;rr.init(g,_),(E=g._zod.def).when??(E.when=Nh),g._zod.check=(T)=>{let R=T.value,w=R.length;if((typeof R==="string"&&w>_.maximum?_p(R):w)<=_.maximum)return;let Z=Ep(R);T.issues.push({origin:Z,code:"too_big",maximum:_.maximum,inclusive:!0,input:R,inst:g,continue:!_.abort})}}),PE=$e("$ZodCheckMinLength",(g,_)=>{var E;rr.init(g,_),(E=g._zod.def).when??(E.when=Nh),g._zod.check=(T)=>{let R=T.value,w=R.length;if((typeof R==="string"&&w>=_.minimum&&w<_.minimum*2?_p(R):w)>=_.minimum)return;let Z=Ep(R);T.issues.push({origin:Z,code:"too_small",minimum:_.minimum,inclusive:!0,input:R,inst:g,continue:!_.abort})}}),zE=$e("$ZodCheckLengthEquals",(g,_)=>{var E;rr.init(g,_),(E=g._zod.def).when??(E.when=Nh),g._zod.check=(T)=>{let R=T.value,w=R.length,B=typeof R==="string"&&w>=_.length&&w<=_.length*2?_p(R):w;if(B===_.length)return;let Z=Ep(R),K=B>_.length;T.issues.push({origin:Z,...K?{code:"too_big",maximum:_.length}:{code:"too_small",minimum:_.length},inclusive:!0,exact:!0,input:T.value,inst:g,continue:!_.abort})}}),Yu=$e("$ZodCheckStringFormat",(g,_)=>{var E,T;if(rr.init(g,_),_.pattern)(E=g._zod).check??(E.check=(R)=>{if(_.pattern.lastIndex=0,_.pattern.test(R.value))return;R.issues.push({origin:"string",code:"invalid_format",format:_.format,input:R.value,..._.pattern?{pattern:_.pattern.toString()}:{},inst:g,continue:!_.abort})});else(T=g._zod).check??(T.check=()=>{})}),NE=$e("$ZodCheckRegex",(g,_)=>{Yu.init(g,_),g._zod.check=(E)=>{if(_.pattern.lastIndex=0,_.pattern.test(E.value))return;E.issues.push({origin:"string",code:"invalid_format",format:"regex",input:E.value,pattern:_.pattern.toString(),inst:g,continue:!_.abort})}}),OE=$e("$ZodCheckLowerCase",(g,_)=>{_.pattern??(_.pattern=kE),Yu.init(g,_)}),ME=$e("$ZodCheckUpperCase",(g,_)=>{_.pattern??(_.pattern=IE),Yu.init(g,_)}),LE=$e("$ZodCheckIncludes",(g,_)=>{rr.init(g,_);let E=Mi(_.includes),T=new RegExp(typeof _.position==="number"?`^.{${_.position},}${E}`:E);_.pattern=T,g._zod.check=(R)=>{if(R.value.includes(_.includes,_.position))return;R.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:_.includes,input:R.value,inst:g,continue:!_.abort})}}),DE=$e("$ZodCheckStartsWith",(g,_)=>{rr.init(g,_);let E=new RegExp(`^${Mi(_.prefix)}.*`);_.pattern??(_.pattern=E),g._zod.check=(T)=>{if(T.value.startsWith(_.prefix))return;T.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:_.prefix,input:T.value,inst:g,continue:!_.abort})}}),$E=$e("$ZodCheckEndsWith",(g,_)=>{rr.init(g,_);let E=new RegExp(`.*${Mi(_.suffix)}$`);_.pattern??(_.pattern=E),g._zod.check=(T)=>{if(T.value.endsWith(_.suffix))return;T.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:_.suffix,input:T.value,inst:g,continue:!_.abort})}});var UE=$e("$ZodCheckOverwrite",(g,_)=>{rr.init(g,_),g._zod.check=(E)=>{E.value=_.tx(E.value)}});class Lh{constructor(g=[],_={}){this.content=[],this.indent=0,this.args=g,this.closed=_}indented(g){this.indent+=1;try{g(this)}finally{this.indent-=1}}write(g){if(typeof g==="function"){g(this,{execution:"sync"}),g(this,{execution:"async"});return}let E=g.split(`
|
|
3
|
+
`).filter((w)=>w),T=Math.min(...E.map((w)=>w.length-w.trimStart().length)),R=E.map((w)=>w.slice(T)).map((w)=>" ".repeat(this.indent*2)+w);for(let w of R)this.content.push(w)}compile(){let g=Function,_=this?.content??[""];return new g(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
4
|
+
${_.join(`
|
|
5
|
+
`)}
|
|
6
|
+
};`)(...Object.values(this.closed))}}var BE={major:4,minor:6,patch:5};var xn=$e("$ZodType",(g,_)=>{var E;g??(g={}),g._zod.def=_,g._zod.bag=g._zod.bag||{},g._zod.version=BE;let T=g._zod.def.checks,R=g._zod.traits.has("$ZodCheck")?[g,...T??[]]:T?.length?[...T]:[];for(let w of R)for(let B of w._zod.onattach)B(g);if(R.length===0)(E=g._zod).deferred??(E.deferred=[]),g._zod.deferred?.push(()=>{g._zod.run=g._zod.parse});else{let w=(Z,K,X)=>{if(Z.memo)return Z;let ee=Ho(Z),re;for(let ie of K){if(ie._zod.def.when){if(O_(Z))continue;if(!ie._zod.def.when(Z))continue}else if(ee)continue;let se=Z.issues.length,ae=ie._zod.check(Z);if(ae instanceof Promise&&X?.async===!1)throw new jo;if(re||ae instanceof Promise)re=(re??Promise.resolve()).then(async()=>{if(await ae,Z.issues.length===se)return;if(Th(Z.issues,se,g),!ee)ee=Ho(Z,se)});else{if(Z.issues.length===se)continue;if(Th(Z.issues,se,g),!ee)ee=Ho(Z,se)}}if(re)return re.then(()=>Z);return Z},B=(Z,K,X)=>{if(Ho(Z))return Z.aborted=!0,Z;let ee=w(K,R,X);if(ee instanceof Promise){if(X.async===!1)throw new jo;return ee.then((re)=>g._zod.parse(re,X))}return g._zod.parse(ee,X)};g._zod.run=(Z,K)=>{if(K.skipChecks)return g._zod.parse(Z,K);if(K.direction==="backward"){let ee=g._zod.parse({value:Z.value,issues:[]},{...K,skipChecks:!0});if(ee instanceof Promise)return ee.then((re)=>B(re,Z,K));return B(ee,Z,K)}let X=g._zod.parse(Z,K);if(X instanceof Promise){if(K.async===!1)throw new jo;return X.then((ee)=>w(ee,R,K))}return w(X,R,K)}}},{get "~standard"(){return Tp(this,"~standard",$h(this))},set "~standard"(g){si(this,"~standard",g)}}),XE=(g,_)=>g.issues.length?{issues:g.issues.map((E)=>qo(E,_,Lr()))}:{value:g.value};async function H2(g,_){let E={async:!0};return XE(await g._zod.run({value:_,issues:[]},E),E)}function $h(g){return{validate:(_)=>{let E={async:!1};try{let T=g._zod.run({value:_,issues:[]},E);if(!(T instanceof Promise))return XE(T,E)}catch(T){}return H2(g,_)},vendor:"zod",version:1}}var Pp=$e("$ZodString",(g,_)=>{xn.init(g,_),g._zod.pattern=_.pattern??yE,g._zod.parse=(E,T)=>{if(_.coerce)try{E.value=String(E.value)}catch(R){}if(typeof E.value==="string")return E;return E.issues.push({expected:"string",code:"invalid_type",input:E.value,inst:g}),E}}),wn=$e("$ZodStringFormat",(g,_)=>{Yu.init(g,_),Pp.init(g,_)}),QE=$e("$ZodGUID",(g,_)=>{_.pattern??(_.pattern=aE),wn.init(g,_)}),eT=$e("$ZodUUID",(g,_)=>{if(_.version){let T={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[_.version];if(T===void 0)throw Error(`Invalid UUID version: "${_.version}"`);_.pattern??(_.pattern=Ph(T))}else _.pattern??(_.pattern=Ph());wn.init(g,_)}),tT=$e("$ZodEmail",(g,_)=>{_.pattern??(_.pattern=uE),wn.init(g,_)}),nT=1,wp=2;function rT(g){try{if(typeof URL<"u"&&typeof URL.canParse==="function")return URL.canParse(g);return new URL(g),!0}catch{return!1}}function q2(g,_){if(!("normalize"in _)&&!("hostname"in _)&&!("protocol"in _))return rT(g)||wp;return j2(g,_)}function j2(g,_){if(!_.normalize&&_.protocol?.source===gE.source&&!/^https?:\/\//i.test(g))return nT;try{if(typeof URL<"u"){let E=URL;if(typeof E.parse==="function")return E.parse(g)??wp}return new URL(g)}catch{return wp}}var Z2=/[\t\n\r]/g;function HE(g){return g.replace(Z2,"")}function V2(g,_){return _.lastIndex=0,_.test(g.hostname)}function G2(g,_){return _.lastIndex=0,_.test(g.protocol.endsWith(":")?g.protocol.slice(0,-1):g.protocol)}var oT=$e("$ZodURL",(g,_)=>{wn.init(g,_),g._zod.check=(E)=>{try{let T=E.value.trim(),R=q2(T,_);if(R===nT){E.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:E.value,inst:g,continue:!_.abort});return}if(R===wp){E.issues.push({code:"invalid_format",format:"url",input:E.value,inst:g,continue:!_.abort});return}if(R===!0){E.value=HE(T);return}if(_.hostname&&!V2(R,_.hostname))E.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:_.hostname.source,input:E.value,inst:g,continue:!_.abort});if(_.protocol&&!G2(R,_.protocol))E.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:_.protocol.source,input:E.value,inst:g,continue:!_.abort});E.value=_.normalize?R.href:HE(T);return}catch(T){E.issues.push({code:"invalid_format",format:"url",input:E.value,inst:g,continue:!_.abort})}}}),iT=$e("$ZodEmoji",(g,_)=>{_.pattern??(_.pattern=cE()),wn.init(g,_)}),sT=$e("$ZodNanoID",(g,_)=>{if(_.length!==void 0&&(!Number.isInteger(_.length)||_.length<1))throw Error(`Invalid nanoid length: ${_.length}`);_.pattern??(_.pattern=_.length===void 0?oE:iE(_.length)),wn.init(g,_)}),aT=$e("$ZodCUID",(g,_)=>{_.pattern??(_.pattern=Q_),wn.init(g,_)}),uT=$e("$ZodCUID2",(g,_)=>{_.pattern??(_.pattern=eE),wn.init(g,_)}),cT=$e("$ZodULID",(g,_)=>{_.pattern??(_.pattern=tE),wn.init(g,_)}),lT=$e("$ZodXID",(g,_)=>{_.pattern??(_.pattern=nE),wn.init(g,_)}),dT=$e("$ZodKSUID",(g,_)=>{_.pattern??(_.pattern=rE),wn.init(g,_)}),pT=$e("$ZodISODateTime",(g,_)=>{_.pattern??(_.pattern=TE(_)),wn.init(g,_)}),mT=$e("$ZodISODate",(g,_)=>{_.pattern??(_.pattern=_E),wn.init(g,_)}),fT=$e("$ZodISOTime",(g,_)=>{_.pattern??(_.pattern=EE(_)),wn.init(g,_)}),hT=$e("$ZodISODuration",(g,_)=>{_.pattern??(_.pattern=sE),wn.init(g,_)}),gT=$e("$ZodIPv4",(g,_)=>{_.pattern??(_.pattern=lE),wn.init(g,_)}),Y2=/^[0-9a-fA-F:.]+$/;function bT(g){if(!Y2.test(g))return!1;return rT(`http://[${g}]`)}var ST=$e("$ZodIPv6",(g,_)=>{_.pattern??(_.pattern=dE),wn.init(g,_),g._zod.check=(E)=>{if(!bT(E.value))E.issues.push({code:"invalid_format",format:"ipv6",input:E.value,inst:g,continue:!_.abort})}});var _T=$e("$ZodCIDRv4",(g,_)=>{_.pattern??(_.pattern=pE),wn.init(g,_)});function W2(g){let _=g.split("/");if(_.length!==2)return!1;let[E,T]=_;if(!T)return!1;let R=Number(T);if(`${R}`!==T)return!1;if(R<0||R>128)return!1;return bT(E)}var ET=$e("$ZodCIDRv6",(g,_)=>{_.pattern??(_.pattern=mE),wn.init(g,_),g._zod.check=(E)=>{if(!W2(E.value))E.issues.push({code:"invalid_format",format:"cidrv6",input:E.value,inst:g,continue:!_.abort})}});function TT(g){if(g==="")return!0;if(/\s/.test(g))return!1;if(g.length%4!==0)return!1;try{return atob(g),!0}catch{return!1}}var Uh=/^[0-9a-zA-Z+/]*={0,2}$/,yT=$e("$ZodBase64",(g,_)=>{_.pattern??(_.pattern=Uh),wn.init(g,_),g._zod.check=(E)=>{if(TT(E.value))return;E.issues.push({code:"invalid_format",format:"base64",input:E.value,inst:g,continue:!_.abort})}}),zp=/^[A-Za-z0-9_-]*$/;function K2(g){if(!zp.test(g))return!1;let _=g.replace(/[-_]/g,(T)=>T==="-"?"+":"/"),E=_.padEnd(Math.ceil(_.length/4)*4,"=");return TT(E)}var vT=$e("$ZodBase64URL",(g,_)=>{_.pattern??(_.pattern=zp),wn.init(g,_),g._zod.check=(E)=>{if(K2(E.value))return;E.issues.push({code:"invalid_format",format:"base64url",input:E.value,inst:g,continue:!_.abort})}}),xT=$e("$ZodE164",(g,_)=>{_.pattern??(_.pattern=bE),wn.init(g,_)});function J2(g,_=null){try{let E=g.split(".");if(E.length!==3)return!1;let[T]=E;if(!T)return!1;let R=JSON.parse(atob(T));if("typ"in R&&R?.typ!=="JWT")return!1;if(!R.alg)return!1;if(_&&(!("alg"in R)||R.alg!==_))return!1;return!0}catch{return!1}}var RT=$e("$ZodJWT",(g,_)=>{wn.init(g,_),g._zod.check=(E)=>{if(J2(E.value,_.alg))return;E.issues.push({code:"invalid_format",format:"jwt",input:E.value,inst:g,continue:!_.abort})}});var Fh=$e("$ZodNumber",(g,_)=>{xn.init(g,_),g._zod.pattern=Gu,g._zod.parse=(E,T)=>{if(_.coerce)try{E.value=Number(E.value)}catch(B){}let R=E.value;if(typeof R==="number"&&!Number.isNaN(R)&&Number.isFinite(R))return E;let w=typeof R==="number"?Number.isNaN(R)?"NaN":!Number.isFinite(R)?String(R):void 0:void 0;return E.issues.push({expected:"number",code:"invalid_type",input:R,inst:g,...w?{received:w}:{}}),E}}),kT=$e("$ZodNumberFormat",(g,_)=>{wE.init(g,_),Fh.init(g,_)}),IT=$e("$ZodBoolean",(g,_)=>{xn.init(g,_),g._zod.pattern=vE,g._zod.parse=(E,T)=>{if(_.coerce)try{E.value=Boolean(E.value)}catch(w){}let R=E.value;if(typeof R==="boolean")return E;return E.issues.push({expected:"boolean",code:"invalid_type",input:R,inst:g}),E}});var CT=$e("$ZodUndefined",(g,_)=>{xn.init(g,_),g._zod.pattern=RE,g._zod.values=new Set([void 0]),g._zod.parse=(E,T)=>{let R=E.value;if(typeof R>"u")return E;return E.issues.push({expected:"undefined",code:"invalid_type",input:R,inst:g}),E}}),wT=$e("$ZodNull",(g,_)=>{xn.init(g,_),g._zod.pattern=xE,g._zod.values=new Set([null]),g._zod.parse=(E,T)=>{let R=E.value;if(R===null)return E;return E.issues.push({expected:"null",code:"invalid_type",input:R,inst:g}),E}}),AT=$e("$ZodAny",(g,_)=>{xn.init(g,_),g._zod.parse=(E)=>E}),PT=$e("$ZodUnknown",(g,_)=>{xn.init(g,_),g._zod.parse=(E)=>E}),zT=$e("$ZodNever",(g,_)=>{xn.init(g,_),g._zod.parse=(E,T)=>(E.issues.push({expected:"never",code:"invalid_type",input:E.value,inst:g}),E)});function qE(g,_,E){if(g.issues.length)_.issues.push(...Li(E,g.issues));_.value[E]=g.value}var NT=$e("$ZodArray",(g,_)=>{xn.init(g,_);let E=Mr.memoizer;E?.attach(g),g._zod.parse=(T,R)=>{let w=T.value;if(!Array.isArray(w))return T.issues.push({expected:"array",code:"invalid_type",input:w,inst:g}),T;T.value=E?E.alloc(g,T,Array(w.length),R):Array(w.length);let B=[],Z=R?.abortEarly;for(let K=0;K<w.length;K++){let X=w[K],ee=_.element._zod.run({value:X,issues:[]},R);if(ee instanceof Promise)B.push(ee.then((re)=>qE(re,T,K)));else if(qE(ee,T,K),Z&&ee.issues.length!==0&&Ho(ee))break}if(B.length)return Promise.all(B).then(()=>T);return T}});function Ap(g,_,E,T,R,w){let B=E in T,Z=w==="optional";if(!B&&Z&&R==="optional")return;if(g.issues.length){if(R!==void 0&&Z&&!B)return;_.issues.push(...Li(E,g.issues))}if(!B&&R===void 0){if(!g.issues.length)_.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[E]});return}if(g.value===void 0){if(B||R==="defaulted"&&!Z)_.value[E]=void 0}else _.value[E]=g.value}var X2=[];function OT(g){let _=Object.keys(g.shape),E=Object.getOwnPropertySymbols(g.shape),T=E.length?E:X2,R=T.length?[..._,...T]:_;for(let B of R)if(!g.shape?.[B]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(B)}": expected a Zod schema`);let w=P_(g.shape);return{...g,allKeys:R,symbolKeys:T,keySet:new Set(_),numKeys:_.length,optionalKeys:new Set(w)}}function MT(g,_,E,T,R,w,B){let Z=[],K=R.keySet,X=R.catchall._zod,ee=X.def.type,{optin:re,optout:ie}=X,se=0;for(let ae in _){if(B&&E.issues.length!==se){if(Ho(E,se))break;se=E.issues.length}if(K.has(ae))continue;if(ae==="__proto__"){if(ee==="never")Z.push(ae);continue}if(ee==="never"){Z.push(ae);continue}let fe=X.run({value:_[ae],issues:[]},T);if(fe instanceof Promise)g.push(fe.then((xe)=>Ap(xe,E,ae,_,re,ie)));else Ap(fe,E,ae,_,re,ie)}if(Z.length)E.issues.push({code:"unrecognized_keys",keys:Z,input:_,inst:w,continue:!0});if(!g.length)return E;return Promise.all(g).then(()=>E)}var Q2=$e("$ZodObject",(g,_)=>{xn.init(g,_);let E=Object.getOwnPropertyDescriptor(_,"shape"),T=E?.get?E.get.raw:_.shape??{};if(T){let X=()=>{let ee={...T};return Object.defineProperty(_,"shape",{value:ee}),X.raw=ee,ee};X.raw=T,Object.defineProperty(_,"shape",{get:X})}let R=ju(()=>OT(_));mn(g,"propValues",(X)=>{let ee=X.def.shape,re={};for(let ie in ee){let se=ee[ie]._zod;if(se.values){if(!Object.prototype.hasOwnProperty.call(re,ie))Vr(re,ie,new Set);for(let ae of se.values)re[ie].add(ae);if(se.optin!==void 0)re[ie].add(void 0)}}return re});let w=da,B=_.catchall,Z,K=Mr.memoizer;K?.attach(g),g._zod.parse=(X,ee)=>{Z??(Z=R.value);let re=X.value;if(!w(re))return X.issues.push({expected:"object",code:"invalid_type",input:re,inst:g}),X;X.value=K?K.alloc(g,X,{},ee):{};let ie=[],se=Z.shape,ae=ee?.abortEarly,fe=X.issues.length;for(let xe of Z.allKeys){if(ae&&X.issues.length!==fe){if(Ho(X,fe))break;fe=X.issues.length}if(xe==="__proto__")continue;let Ee=se[xe],Ae=Ee._zod.optin,Re=Ee._zod.optout,Ve=Ee._zod.run({value:re[xe],issues:[]},ee);if(Ve instanceof Promise)ie.push(Ve.then((Ge)=>Ap(Ge,X,xe,re,Ae,Re)));else Ap(Ve,X,xe,re,Ae,Re)}if(!B)return ie.length?Promise.all(ie).then(()=>X):X;return MT(ie,re,X,ee,R.value,g,ae===!0)}}),LT=$e("$ZodObjectJIT",(g,_)=>{Q2.init(g,_);let E=g._zod.parse,T=ju(()=>OT(_)),R=Mr.memoizer,w=(se)=>{let ae=T.value,fe=ae.symbolKeys,xe=new Lh(["payload","ctx"],{shape:se,inst:g,memo:R,syms:fe}),Ee=(Ge)=>`shape[${Ge}]._zod.run({ value: input[${Ge}], issues: [] }, ctx)`,Ae=(Ge,ke)=>`
|
|
7
|
+
let ${Ge}_ab = false;
|
|
8
|
+
for (let i = 0; i < ${Ge}.issues.length; i++) {
|
|
9
|
+
const iss = ${Ge}.issues[i];
|
|
10
|
+
iss.path = iss.path ? [${ke}, ...iss.path] : [${ke}];
|
|
11
|
+
payload.issues.push(iss);
|
|
12
|
+
if (iss.continue !== true) ${Ge}_ab = true;
|
|
13
|
+
}
|
|
14
|
+
if (${Ge}_ab && ctx && ctx.abortEarly) {
|
|
15
|
+
payload.value = newResult;
|
|
16
|
+
return payload;
|
|
17
|
+
}`;xe.write("const input = payload.value;");let Re=Object.create(null),Ve=0;for(let Ge of ae.allKeys)Re[Ge]=`key_${Ve++}`;xe.write(R?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let Ge of ae.allKeys){if(Ge==="__proto__")continue;let ke=Re[Ge],qe=typeof Ge==="symbol"?`syms[${fe.indexOf(Ge)}]`:I_(Ge),pt=`${qe} in input`,ht=se[Ge],Oe=ht?._zod?.optin,Rt=Oe!==void 0,Nt=ht?._zod?.optout==="optional";if(xe.write(`const ${ke} = ${Ee(qe)};`),Rt&&Nt){let mt=Oe==="optional"?`${ke}_present`:`${ke}.value !== undefined || ${ke}_present`;xe.write(`
|
|
18
|
+
const ${ke}_present = ${pt};
|
|
19
|
+
if (!${ke}.issues.length || ${ke}_present) {
|
|
20
|
+
if (${ke}.issues.length) {${Ae(ke,qe)}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (${mt}) {
|
|
24
|
+
newResult[${qe}] = ${ke}.value;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
`)}else if(!Rt)xe.write(`
|
|
29
|
+
const ${ke}_present = ${pt};
|
|
30
|
+
if (${ke}.issues.length) {${Ae(ke,qe)}
|
|
31
|
+
}
|
|
32
|
+
if (!${ke}_present && !${ke}.issues.length) {
|
|
33
|
+
payload.issues.push({
|
|
34
|
+
code: "invalid_type",
|
|
35
|
+
expected: "nonoptional",
|
|
36
|
+
input: undefined,
|
|
37
|
+
path: [${qe}]
|
|
38
|
+
});
|
|
39
|
+
if (ctx && ctx.abortEarly) {
|
|
40
|
+
payload.value = newResult;
|
|
41
|
+
return payload;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (${ke}_present) {
|
|
46
|
+
newResult[${qe}] = ${ke}.value;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
`);else if(xe.write(`
|
|
50
|
+
if (${ke}.issues.length) {${Ae(ke,qe)}
|
|
51
|
+
}
|
|
52
|
+
`),Oe==="defaulted")xe.write(`newResult[${qe}] = ${ke}.value;`);else xe.write(`
|
|
53
|
+
if (${ke}.value !== undefined || ${pt}) {
|
|
54
|
+
newResult[${qe}] = ${ke}.value;
|
|
55
|
+
}
|
|
56
|
+
`)}return xe.write("payload.value = newResult;"),xe.write("return payload;"),xe.compile()},B,Z=da,K=!Mr.jitless,ee=K&&w_.value,re=_.catchall,ie;g._zod.parse=(se,ae)=>{ie??(ie=T.value);let fe=se.value;if(!Z(fe))return se.issues.push({expected:"object",code:"invalid_type",input:fe,inst:g}),se;if(K&&ee&&ae?.async===!1&&ae.jitless!==!0){if(!B)B=w(_.shape);if(se=B(se,ae),!re)return se;return MT([],fe,se,ae,ie,g,ae?.abortEarly===!0)}return E(se,ae)}});function jE(g,_,E,T){for(let w of g)if(w.issues.length===0)return _.value=w.value,_;let R=g.filter((w)=>!Ho(w));if(R.length===1)return _.value=R[0].value,R[0];return _.issues.push({code:"invalid_union",input:_.value,inst:E,errors:g.map((w)=>w.issues.map((B)=>qo(B,T,Lr())))}),_}var Bh=$e("$ZodUnion",(g,_)=>{xn.init(g,_),mn(g,"optin",(T)=>T.def.options.some((R)=>R._zod.optin==="defaulted")?"defaulted":T.def.options.some((R)=>R._zod.optin!==void 0)?"optional":void 0),mn(g,"optout",(T)=>T.def.options.some((R)=>R._zod.optout==="optional")?"optional":void 0),mn(g,"values",(T)=>{if(T.def.options.every((R)=>R._zod.values))return new Set(T.def.options.flatMap((R)=>Array.from(R._zod.values)));return}),mn(g,"pattern",(T)=>{if(T.def.options.every((R)=>R._zod.pattern)){let R=T.def.options.map((w)=>w._zod.pattern);return new RegExp(`^(${R.map((w)=>gp(w.source)).join("|")})$`)}return});let E=_.options.length===1?_.options[0]._zod.run:null;g._zod.parse=(T,R)=>{if(E)return E(T,R);let w=!1,B=[];for(let Z of _.options){let K=Z._zod.run({value:T.value,issues:[]},R);if(K instanceof Promise)B.push(K),w=!0;else{if(K.issues.length===0)return K;B.push(K)}}if(!w)return jE(B,T,g,R);return Promise.all(B).then((Z)=>jE(Z,T,g,R))}});function ez(g){let _=new Map;for(let E of g.options){let T=E._zod.propValues?.[g.discriminator];if(!T||T.size===0)throw Error(`Invalid discriminated union option at index "${g.options.indexOf(E)}"`);for(let R of T)if(_.has(R)){if(R!==void 0)throw Error(`Duplicate discriminator value "${String(R)}"`);_.set(R,null)}else _.set(R,E)}return _}var DT=$e("$ZodDiscriminatedUnion",(g,_)=>{_.inclusive=!1,Bh.init(g,_);let E=g._zod.parse;mn(g,"propValues",(R)=>{let w={},B=0;for(let Z of R.def.options){let K=Z._zod.propValues;if(!K||Object.keys(K).length===0)throw Error(`Invalid discriminated union option at index "${R.def.options.indexOf(Z)}"`);if(K[R.def.discriminator]?.has(void 0))B++;for(let[X,ee]of Object.entries(K)){if(!Object.prototype.hasOwnProperty.call(w,X))Vr(w,X,new Set);for(let re of ee)w[X].add(re)}}if(!R.def.unionFallback&&B>1)w[R.def.discriminator]?.delete(void 0);return w}),_.options.forEach((R,w)=>{let B=Zu(R._zod.def);if(B&&!Object.prototype.hasOwnProperty.call(B,_.discriminator))throw Error(`Invalid discriminated union option at index "${w}"`)});let T=ju(()=>ez(_));g._zod.parse=(R,w)=>{let B=R.value;if(!da(B))return R.issues.push({code:"invalid_type",expected:"object",input:B,inst:g}),R;let Z=B?.[_.discriminator],K=T.value.get(Z);if(K&&(Z!==void 0||w.direction!=="backward"))return K._zod.run(R,w);if(_.unionFallback||w.direction==="backward")return E(R,w);return R.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:_.discriminator,options:Array.from(T.value.keys()).filter((X)=>T.value.get(X)!==null),input:B,path:[_.discriminator],inst:g}),R}}),$T=$e("$ZodIntersection",(g,_)=>{xn.init(g,_),g._zod.parse=(E,T)=>{let R=E.value,w=_.left._zod.run({value:R,issues:[]},T),B=_.right._zod.run({value:R,issues:[]},T);if(w instanceof Promise||B instanceof Promise)return Promise.all([w,B]).then(([K,X])=>ZE(E,K,X));return ZE(E,w,B)}});function Dh(g,_){if(g===_)return{valid:!0,data:g};if(g instanceof Date&&_ instanceof Date&&+g===+_)return{valid:!0,data:g};if(bs(g)&&bs(_)){let E=Object.keys(_),T=Object.keys(g).filter((w)=>E.indexOf(w)!==-1),R={...g,..._};if(Object.prototype.hasOwnProperty.call(R,"__proto__"))delete R.__proto__;for(let w of T){if(w==="__proto__")continue;let B=Dh(g[w],_[w]);if(!B.valid)return{valid:!1,mergeErrorPath:[w,...B.mergeErrorPath]};R[w]=B.data}return{valid:!0,data:R}}if(Array.isArray(g)&&Array.isArray(_)){if(g.length!==_.length)return{valid:!1,mergeErrorPath:[]};let E=[];for(let T=0;T<g.length;T++){let R=g[T],w=_[T],B=Dh(R,w);if(!B.valid)return{valid:!1,mergeErrorPath:[T,...B.mergeErrorPath]};E.push(B.data)}return{valid:!0,data:E}}return{valid:!1,mergeErrorPath:[]}}function ZE(g,_,E){let T=new Map,R,w=new Map,B=(X,ee)=>{let re;if(X.code==="unrecognized_keys"&&!X.path?.length)R??(R=X),re=X.keys;else if(X.code==="invalid_key"&&X.origin==="record"&&X.path?.length===1){let ie=String(X.path[0]);if(!w.has(ie))w.set(ie,X);re=[ie]}else return!1;for(let ie of re){if(!T.has(ie))T.set(ie,{});T.get(ie)[ee]=!0}return!0};for(let X of _.issues)if(!B(X,"l"))g.issues.push(X);for(let X of E.issues)if(!B(X,"r"))g.issues.push(X);let Z=[...T].filter(([,X])=>X.l&&X.r).map(([X])=>X);if(Z.length){let X=R?Z.filter((ee)=>R.keys.includes(ee)):[];if(X.length)g.issues.push({...R,keys:X});for(let ee of Z)if(!X.includes(ee)&&w.has(ee))g.issues.push(w.get(ee))}let K=Dh(_.value,E.value);if(!K.valid){if(Ho(g))return g;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(K.mergeErrorPath)}`)}return g.value=K.data,g}var UT=$e("$ZodRecord",(g,_)=>{xn.init(g,_);let E=Mr.memoizer;E?.attach(g),g._zod.parse=(T,R)=>{let w=T.value;if(!bs(w))return T.issues.push({expected:"record",code:"invalid_type",input:w,inst:g}),T;let B=[],Z=_.keyType._zod.values;if(Z&&!_.partial){T.value=E?E.alloc(g,T,{},R):{};let K=new Set;for(let ee of Z)if(typeof ee==="string"||typeof ee==="number"||typeof ee==="symbol"){if(K.add(typeof ee==="number"?ee.toString():ee),ee==="__proto__")continue;let re=_.keyType._zod.run({value:ee,issues:[]},R);if(re instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(re.issues.length){T.issues.push({code:"invalid_key",origin:"record",issues:re.issues.map((ae)=>qo(ae,R,Lr())),input:ee,path:[ee],inst:g});continue}let ie=re.value;if(ie==="__proto__")continue;let se=_.valueType._zod.run({value:w[ee],issues:[]},R);if(se instanceof Promise)B.push(se.then((ae)=>{if(ae.issues.length)T.issues.push(...Li(ee,ae.issues));T.value[ie]=ae.value}));else{if(se.issues.length)T.issues.push(...Li(ee,se.issues));T.value[ie]=se.value}}let X;for(let ee in w)if(!K.has(ee))if(_.mode==="loose"){if(ee==="__proto__")continue;T.value[ee]=w[ee]}else X=X??[],X.push(ee);if(X&&X.length>0)T.issues.push({code:"unrecognized_keys",input:w,inst:g,keys:X,continue:!0})}else{T.value=E?E.alloc(g,T,{},R):{};let K;for(let X of Reflect.ownKeys(w)){if(X==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(w,X))continue;let ee=_.keyType._zod.run({value:X,issues:[]},R);if(ee instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof X==="string"&&Gu.test(X)&&ee.issues.length){let ae=_.keyType._zod.run({value:Number(X),issues:[]},R);if(ae instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(ae.issues.length===0)ee=ae}if(ee.issues.length){if(_.mode==="loose")T.value[X]=w[X];else if(Z)K=K??[],K.push(X);else T.issues.push({code:"invalid_key",origin:"record",issues:ee.issues.map((ae)=>qo(ae,R,Lr())),input:X,path:[X],inst:g});continue}let ie=ee.value;if(ie==="__proto__")continue;let se=_.valueType._zod.run({value:w[X],issues:[]},R);if(se instanceof Promise)B.push(se.then((ae)=>{if(ae.issues.length)T.issues.push(...Li(X,ae.issues));T.value[ie]=ae.value}));else{if(se.issues.length)T.issues.push(...Li(X,se.issues));T.value[ie]=se.value}}if(K&&K.length>0)T.issues.push({code:"unrecognized_keys",input:w,inst:g,keys:K,continue:!0})}if(B.length)return Promise.all(B).then(()=>T);return T}});var FT=$e("$ZodEnum",(g,_)=>{xn.init(g,_);let E=Hu(_.entries),T=new Set(E);g._zod.values=T,mn(g,"pattern",(R)=>{let w=Hu(R.def.entries).filter((B)=>A_.has(typeof B));return new RegExp(w.length?`^(${w.map((B)=>Mi(B.toString())).join("|")})$`:"^[^\\s\\S]$")}),g._zod.parse=(R,w)=>{let B=R.value;if(T.has(B))return R;return R.issues.push({code:"invalid_value",values:E,input:B,inst:g}),R}}),BT=$e("$ZodLiteral",(g,_)=>{xn.init(g,_);let E=new Set(_.values);g._zod.values=E,mn(g,"pattern",(T)=>{let R=T.def.values;return new RegExp(R.length?`^(${R.map((w)=>typeof w==="string"?Mi(w):w?Mi(w.toString()):String(w)).join("|")})$`:"^[^\\s\\S]$")}),g._zod.parse=(T,R)=>{let w=T.value;if(E.has(w))return T;return T.issues.push({code:"invalid_value",values:_.values,input:w,inst:g}),T}});var HT=$e("$ZodTransform",(g,_)=>{xn.init(g,_),g._zod.optin="optional",Mr.memoizer?.guard(g),g._zod.parse=(E,T)=>{if(T.direction==="backward")throw new Vu(g.constructor.name);let R=_.transform(E.value,E);if(T.async)return(R instanceof Promise?R:Promise.resolve(R)).then((B)=>(E.value=B,E));if(R instanceof Promise)throw new jo;return E.value=R,E}});function VE(g,_){return g.value=_.issues.length?void 0:_.value,g}var Hh=$e("$ZodOptional",(g,_)=>{xn.init(g,_),mn(g,"optin",(E)=>E.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),g._zod.optout="optional",mn(g,"values",(E)=>{let T=E.def.innerType._zod.values;return T?new Set([...T,void 0]):void 0}),mn(g,"pattern",(E)=>{let T=E.def.innerType._zod.pattern;return T?new RegExp(`^(${gp(T.source)})?$`):void 0}),g._zod.parse=(E,T)=>{if(E.value===void 0){if(_.innerType._zod.optin!=="defaulted")return E;let R=_.innerType._zod.run({value:E.value,issues:[]},T);if(R instanceof Promise)return R.then((w)=>VE(E,w));return VE(E,R)}return _.innerType._zod.run(E,T)}}),qT=$e("$ZodExactOptional",(g,_)=>{Hh.init(g,_),mn(g,"values",(E)=>E.def.innerType._zod.values),mn(g,"pattern",(E)=>E.def.innerType._zod.pattern),g._zod.parse=(E,T)=>_.innerType._zod.run(E,T)}),jT=$e("$ZodNullable",(g,_)=>{xn.init(g,_),mn(g,"optin",(E)=>E.def.innerType._zod.optin),mn(g,"optout",(E)=>E.def.innerType._zod.optout),mn(g,"pattern",(E)=>{let T=E.def.innerType._zod.pattern;return T?new RegExp(`^(${gp(T.source)}|null)$`):void 0}),mn(g,"values",(E)=>E.def.innerType._zod.values?new Set([...E.def.innerType._zod.values,null]):void 0),g._zod.parse=(E,T)=>{if(E.value===null)return E;return _.innerType._zod.run(E,T)}}),ZT=$e("$ZodDefault",(g,_)=>{xn.init(g,_),g._zod.optin="defaulted",mn(g,"values",(E)=>E.def.innerType._zod.values),g._zod.parse=(E,T)=>{if(T.direction==="backward")return _.innerType._zod.run(E,T);if(E.value===void 0)return E.value=_.defaultValue,E;let R=_.innerType._zod.run(E,T);if(R instanceof Promise)return R.then((w)=>GE(w,_));return GE(R,_)}});function GE(g,_){if(g.value===void 0)g.value=_.defaultValue;return g}var VT=$e("$ZodPrefault",(g,_)=>{xn.init(g,_),g._zod.optin="defaulted",mn(g,"values",(E)=>E.def.innerType._zod.values),g._zod.parse=(E,T)=>{if(T.direction==="backward")return _.innerType._zod.run(E,T);if(E.value===void 0)E.value=_.defaultValue;return _.innerType._zod.run(E,T)}}),GT=$e("$ZodNonOptional",(g,_)=>{xn.init(g,_),mn(g,"values",(E)=>{let T=E.def.innerType._zod.values;return T?new Set([...T].filter((R)=>R!==void 0)):void 0}),g._zod.parse=(E,T)=>{let R=_.innerType._zod.run(E,T);if(R instanceof Promise)return R.then((w)=>YE(w,g));return YE(R,g)}});function YE(g,_){if(!g.issues.length&&g.value===void 0)g.issues.push({code:"invalid_type",expected:"nonoptional",input:g.value,inst:_});return g}function WE(g,_,E,T){if(!_.issues.length){if(g.value=_.value,_.memo)g.memo=!0;return g}return g.value=E.catchValue({..._,value:g.value,error:{issues:_.issues.map((R)=>qo(R,T,Lr()))},input:g.value}),g}var YT=$e("$ZodCatch",(g,_)=>{xn.init(g,_),mn(g,"optin",(E)=>E.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),mn(g,"optout",(E)=>E.def.innerType._zod.optout),mn(g,"values",(E)=>E.def.innerType._zod.values),g._zod.parse=(E,T)=>{if(T.direction==="backward")return _.innerType._zod.run(E,T);let R=_.innerType._zod.run({value:E.value,issues:[]},T);if(R instanceof Promise)return R.then((w)=>WE(E,w,_,T));return WE(E,R,_,T)}});var qh=$e("$ZodPipe",(g,_)=>{xn.init(g,_),mn(g,"values",(E)=>E.def.in._zod.values),mn(g,"optin",(E)=>E.def.in._zod.optin),mn(g,"optout",(E)=>E.def.out._zod.optout),mn(g,"propValues",(E)=>E.def.in._zod.propValues),g._zod.parse=(E,T)=>{if(T.direction==="backward"){let w=_.out._zod.run(E,T);if(w instanceof Promise)return w.then((B)=>Cp(B,_.in,T));return Cp(w,_.in,T)}let R=_.in._zod.run(E,T);if(R instanceof Promise)return R.then((w)=>Cp(w,_.out,T));return Cp(R,_.out,T)}});function Cp(g,_,E){if(g.issues.some((T)=>T.code!=="unrecognized_keys"))return g.aborted=!0,g;return _._zod.run({value:g.value,issues:g.issues},E)}var WT=$e("$ZodPreprocess",(g,_)=>{qh.init(g,_)}),KT=$e("$ZodReadonly",(g,_)=>{xn.init(g,_),mn(g,"propValues",(E)=>E.def.innerType._zod.propValues),mn(g,"values",(E)=>E.def.innerType._zod.values),mn(g,"optin",(E)=>E.def.innerType?._zod?.optin),mn(g,"optout",(E)=>E.def.innerType?._zod?.optout),g._zod.parse=(E,T)=>{if(T.direction==="backward")return _.innerType._zod.run(E,T);let R=_.innerType._zod.run(E,T);if(R instanceof Promise)return R.then(KE);return KE(R)}});function KE(g){if(!g.memo)g.value=Object.freeze(g.value);return g}var JT=$e("$ZodLazy",(g,_)=>{xn.init(g,_),x_(g._zod,"innerType",()=>{let E=_;if(!E._cachedInner)E._cachedInner=_.getter();return E._cachedInner}),mn(g,"pattern",(E)=>E.innerType?._zod?.pattern),mn(g,"propValues",(E)=>E.innerType?._zod?.propValues),mn(g,"optin",(E)=>E.innerType?._zod?.optin??void 0),mn(g,"optout",(E)=>E.innerType?._zod?.optout??void 0),g._zod.parse=(E,T)=>g._zod.innerType._zod.run(E,T)}),XT=$e("$ZodCustom",(g,_)=>{rr.init(g,_),xn.init(g,_),g._zod.parse=(E,T)=>E,g._zod.check=(E)=>{let T=E.value,R=_.fn(T);if(R instanceof Promise)return R.then((w)=>JE(w,E,T,g));JE(R,E,T,g);return}});function JE(g,_,E,T){if(!g){let R={code:"custom",input:E,inst:T,path:[...T._zod.def.path??[]],continue:!T._zod.def.abort};if(T._zod.def.params)R.params=T._zod.def.params;_.issues.push(Ss(R))}}class ey extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform");this.name="ZodCyclicError"}}var Zh="~memo",QT=[];function ty(g){return g!==null&&typeof g==="object"}function jh(g){return g.map((_)=>_.path?{..._,path:_.path.slice()}:{..._})}var ny=new WeakMap,Wu=0,Mp=1,Ku=2;function Lp(g,_,E){let T=ny.get(g);if(T!==void 0)return T?Ku:Wu;if(_.has(g))return Ku;_.add(g);let R=Wu,w=(ee)=>{if(R!==Ku&&ee?._zod){let re=Lp(ee,_,E);if(re>R)R=re}},B=(ee,re)=>{let ie=Wu;for(let se of Reflect.ownKeys(ee)){let ae=Object.getOwnPropertyDescriptor(ee,se);if(re&&!ae.enumerable)continue;let fe=ae.get?Mp:ae.value?._zod?Lp(ae.value,_,E):Wu;if(fe>ie)ie=fe}return ie},Z=(ee)=>{if(ee>R)R=ee},K=g._zod.def,X=K.type;switch(X){case"object":{let ee=Zu(K);Z(ee?B(ee,!0):Mp),w(K.catchall);break}case"array":w(K.element);break;case"tuple":for(let ee of K.items)w(ee);w(K.rest);break;case"record":case"map":w(K.keyType),w(K.valueType);break;case"set":w(K.valueType);break;case"union":for(let ee of K.options)w(ee);break;case"intersection":w(K.left),w(K.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":w(K.innerType);break;case"pipe":w(K.in),w(K.out);break;case"function":w(K.input),w(K.output);break;case"lazy":{let ee=K._cachedInner??(E?g._zod.innerType:void 0);Z(ee?Lp(ee,_,!1):Mp);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let ee in K){let re=Object.getOwnPropertyDescriptor(K,ee);if(!re||re.get)continue;let ie=re.value;if(!ie||typeof ie!=="object")continue;if(ie._zod)w(ie);else if(Array.isArray(ie))for(let se of ie)w(se)}}return _.delete(g),tz(g,R)}function tz(g,_){if(_!==Mp)ny.set(g,_===Ku);return _}function nz(g,_){let E=g.buckets.get(_);if(!E)E=new WeakMap,g.buckets.set(_,E);return E}var Np,Op=[],rz={alloc(g,_,E){let T=Np;if(!T)return E;Np=void 0;let R={value:E,issues:null};return T.set(_.value,R),Op.push(R),E},guard(g){var _;(_=g._zod).deferred??(_.deferred=[]),g._zod.deferred.push(()=>{let E=g._zod.parse,T=(R,w)=>{if(w.direction!=="backward"&&oz(w,R.value))throw new ey;return E(R,w)};if(g._zod.parse=T,g._zod.run===E)g._zod.run=T})},attach(g){var _;let E,T=!1,R,w;(_=g._zod).deferred??(_.deferred=[]),g._zod.deferred.push(()=>{let B=g._zod.parse,Z=(K,X)=>{if(E===void 0){let Ee=Lp(g,new Set,!1);if(Ee===Wu){if(g._zod.parse=B,g._zod.run===Z)g._zod.run=B;return B(K,X)}if(Ee===Ku||T)E=!0;else T=!0}let ee=K.value;if(!ty(ee))return B(K,X);let re=X[Zh];if(!re)re={buckets:new WeakMap,backEdges:void 0},X[Zh]=re;let ie;if(R===X)ie=w;else ie=nz(re,g),R=X,w=ie;let se=ie.get(ee);if(se){if(K.value=se.value,se.issues){if(se.issues.length)K.issues.push(...jh(se.issues))}else K.memo=!0,re.backEdges??(re.backEdges=new WeakSet),re.backEdges.add(se.value);return K}Np=ie;let ae=Op.length,fe=B(K,X);Np=void 0;let xe=Op.length>ae?Op.pop():void 0;if(fe instanceof Promise)return fe.then((Ee)=>{if(xe)xe.issues=Ee.issues.length?jh(Ee.issues):QT;return Ee});if(xe)xe.issues=fe.issues.length?jh(fe.issues):QT;return fe};if(g._zod.parse=Z,g._zod.run===B)g._zod.run=Z})}};function Vh(){return rz}function oz(g,_){let E=g[Zh]?.backEdges;return E!==void 0&&ty(_)&&E.has(_)}var iz=()=>{let g={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function _(w){return g[w]??null}let E={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},T={nan:"NaN"};function R(w,B){if(w==="number"&&typeof B==="number"&&!Number.isFinite(B))return String(B);return T[w]??w}return(w)=>{switch(w.code){case"invalid_type":{let B=R(w.expected),Z=M_(w.input),K=R(Z,w.input);return`Invalid input: expected ${B}, received ${K}`}case"invalid_value":if(w.values.length===1)return`Invalid input: expected ${_h(w.values[0])}`;return`Invalid option: expected one of ${gh(w.values,"|")}`;case"too_big":{let B=w.exact?"exactly ":w.inclusive?"<=":"<",Z=_(w.origin);if(Z)return`Too big: expected ${w.origin??"value"} to have ${B}${w.maximum.toString()} ${Z.unit??"elements"}`;return`Too big: expected ${w.origin??"value"} to be ${B}${w.maximum.toString()}`}case"too_small":{let B=w.exact?"exactly ":w.inclusive?">=":">",Z=_(w.origin);if(Z)return`Too small: expected ${w.origin} to have ${B}${w.minimum.toString()} ${Z.unit}`;return`Too small: expected ${w.origin} to be ${B}${w.minimum.toString()}`}case"invalid_format":{let B=w;if(B.format==="starts_with")return`Invalid string: must start with "${B.prefix}"`;if(B.format==="ends_with")return`Invalid string: must end with "${B.suffix}"`;if(B.format==="includes")return`Invalid string: must include "${B.includes}"`;if(B.format==="regex")return`Invalid string: must match pattern ${B.pattern}`;return`Invalid ${E[B.format]??w.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${w.divisor}`;case"unrecognized_keys":return`Unrecognized key${w.keys.length>1?"s":""}: ${gh(w.keys,", ")}`;case"invalid_key":return`Invalid key in ${w.origin}`;case"invalid_union":if(w.options&&Array.isArray(w.options)&&w.options.length>0)return`Invalid discriminator value. Expected ${w.options.map((Z)=>`'${Z}'`).join(" | ")}`;if(w.inclusive===!1)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${w.origin}`;default:return"Invalid input"}}};function Gh(){return{localeError:iz()}}var ry;class oy{constructor(){this._map=new WeakMap,this._idmap=new Map}add(g,..._){let E=_[0];if(this._map.set(g,E),E&&typeof E==="object"&&"id"in E)this._idmap.set(E.id,g);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(g){let _=this._map.get(g);if(_&&typeof _==="object"&&"id"in _)this._idmap.delete(_.id);return this._map.delete(g),this}get(g){let _=g._zod.parent;if(_){let E={...this.get(_)??{}};delete E.id;let T={...E,...this._map.get(g)};return Object.keys(T).length?T:void 0}return this._map.get(g)}has(g){return this._map.has(g)}}function iy(){return new oy}(ry=globalThis).__zod_globalRegistry??(ry.__zod_globalRegistry=iy());var Di=globalThis.__zod_globalRegistry;function Yh(g){if(g.checks)g.checks=[...g.checks];return g}function sy(g,_){return new g(Yh({type:"string",...zt(_)}))}function Wh(g,_){return new g({type:"string",format:"email",check:"string_format",abort:!1,...zt(_)})}function ay(g,_){return new g({type:"string",format:"guid",check:"string_format",abort:!1,...zt(_)})}function uy(g,_){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,...zt(_)})}function cy(g,_){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...zt(_)})}function ly(g,_){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...zt(_)})}function dy(g,_){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...zt(_)})}function Kh(g,_){return new g({type:"string",format:"url",check:"string_format",abort:!1,...zt(_)})}function py(g,_){return new g({type:"string",format:"emoji",check:"string_format",abort:!1,...zt(_)})}function my(g,_){return new g({type:"string",format:"nanoid",check:"string_format",abort:!1,...zt(_)})}function fy(g,_){return new g({type:"string",format:"cuid",check:"string_format",abort:!1,...zt(_)})}function hy(g,_){return new g({type:"string",format:"cuid2",check:"string_format",abort:!1,...zt(_)})}function gy(g,_){return new g({type:"string",format:"ulid",check:"string_format",abort:!1,...zt(_)})}function by(g,_){return new g({type:"string",format:"xid",check:"string_format",abort:!1,...zt(_)})}function Sy(g,_){return new g({type:"string",format:"ksuid",check:"string_format",abort:!1,...zt(_)})}function _y(g,_){return new g({type:"string",format:"ipv4",check:"string_format",abort:!1,...zt(_)})}function Ey(g,_){return new g({type:"string",format:"ipv6",check:"string_format",abort:!1,...zt(_)})}function Ty(g,_){return new g({type:"string",format:"cidrv4",check:"string_format",abort:!1,...zt(_)})}function yy(g,_){return new g({type:"string",format:"cidrv6",check:"string_format",abort:!1,...zt(_)})}function vy(g,_){return new g({type:"string",format:"base64",check:"string_format",abort:!1,...zt(_)})}function xy(g,_){return new g({type:"string",format:"base64url",check:"string_format",abort:!1,...zt(_)})}function Ry(g,_){return new g({type:"string",format:"e164",check:"string_format",abort:!1,...zt(_)})}function ky(g,_){return new g({type:"string",format:"jwt",check:"string_format",abort:!1,...zt(_)})}function Dp(g,_){return new g({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...zt(_)})}function $p(g,_){return new g({type:"string",format:"date",check:"string_format",...zt(_)})}function Jh(g,_){return new g({type:"string",format:"time",check:"string_format",precision:null,...zt(_)})}function Xh(g,_){return new g({type:"string",format:"duration",check:"string_format",...zt(_)})}function Iy(g,_){return new g(Yh({type:"number",checks:[],...zt(_)}))}function Cy(g,_){return new g(Yh({type:"number",coerce:!0,checks:[],...zt(_)}))}function wy(g,_){return new g({type:"number",check:"number_format",abort:!1,format:"safeint",...zt(_)})}function Ay(g,_){return new g({type:"boolean",...zt(_)})}function Py(g,_){return new g({type:"undefined",...zt(_)})}function zy(g,_){return new g({type:"null",...zt(_)})}function Ny(g){return new g({type:"any"})}function Oy(g){return new g({type:"unknown"})}function My(g,_){return new g({type:"never",...zt(_)})}function Up(g,_){return new Oh({check:"less_than",...zt(_),value:g,inclusive:!1})}function Ju(g,_){return new Oh({check:"less_than",...zt(_),value:g,inclusive:!0})}function Fp(g,_){return new Mh({check:"greater_than",...zt(_),value:g,inclusive:!1})}function Xu(g,_){return new Mh({check:"greater_than",...zt(_),value:g,inclusive:!0})}function Bp(g,_){return new CE({check:"multiple_of",...zt(_),value:g})}function Hp(g,_){return new AE({check:"max_length",...zt(_),maximum:g})}function ma(g,_){return new PE({check:"min_length",...zt(_),minimum:g})}function qp(g,_){return new zE({check:"length_equals",...zt(_),length:g})}function Qh(g,_){return new NE({check:"string_format",format:"regex",...zt(_),pattern:g})}function eg(g){return new OE({check:"string_format",format:"lowercase",...zt(g)})}function tg(g){return new ME({check:"string_format",format:"uppercase",...zt(g)})}function ng(g,_){return new LE({check:"string_format",format:"includes",...zt(_),includes:g})}function rg(g,_){return new DE({check:"string_format",format:"starts_with",...zt(_),prefix:g})}function og(g,_){return new $E({check:"string_format",format:"ends_with",...zt(_),suffix:g})}function $i(g){return new UE({check:"overwrite",tx:g})}function ig(g){return $i((_)=>_.normalize(g))}function sg(){return $i((g)=>g.trim())}function ag(){return $i((g)=>g.toLowerCase())}function ug(){return $i((g)=>g.toUpperCase())}function cg(){return $i((g)=>C_(g))}function Ly(g,_,E){return new g({type:"array",element:_,...zt(E)})}function Dy(g,_,E){let T=zt(E);return T.abort??(T.abort=!0),new g({type:"custom",check:"custom",fn:_,...T})}function $y(g,_,E){return new g({type:"custom",check:"custom",fn:_,...zt(E)})}function Uy(g,_){let E=sz((T)=>(T.addIssue=(R)=>{if(typeof R==="string")T.issues.push(Ss(R,T.value,E._zod.def));else{let w=R;if(w.fatal)w.continue=!1;if(w.code??(w.code="custom"),!("input"in w))w.input=T.value;w.inst??(w.inst=E),w.continue??(w.continue=!E._zod.def.abort),T.issues.push(Ss(w))}},g(T.value,T)),_);return E}function sz(g,_){let E=new rr({check:"custom",...zt(_)});return E._zod.check=g,E}function Qu(g,..._){for(let E of _)for(let T of Reflect.ownKeys(E))if(Object.prototype.propertyIsEnumerable.call(E,T))Vr(g,T,E[T]);return g}function tc(g){let _=g?.target??"draft-2020-12";if(_==="draft-4")_="draft-04";if(_==="draft-7")_="draft-07";return{processors:g.processors??{},metadataRegistry:g?.metadata??Di,target:_,unrepresentable:g?.unrepresentable??"throw",override:g?.override??(()=>{}),io:g?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:g?.cycles??"ref",reused:g?.reused??"inline",intersections:[],deferred:[],external:g?.external??void 0}}function Jn(g,_,E,T,R){let w=typeof _.unrepresentable==="function"?_.unrepresentable({zodSchema:g,path:T.path,message:R}):_.unrepresentable;if(w==="any")return!1;if(w===void 0||w==="throw")throw Error(R);return Object.assign(E,w),!0}function Rn(g,_,E={path:[],schemaPath:[]}){var T;let R=g._zod.def,w=_.seen.get(g);if(w){if(w.count++,E.schemaPath.includes(g))w.cycle=E.path;return w.schema}let B={schema:{},count:1,cycle:void 0,path:E.path};_.seen.set(g,B),_.sharedDefsExtractedFor=void 0,_.sharedEmitDoneFor=void 0;let Z=g._zod.toJSONSchema?.();if(Z)B.schema=Z;else{let ee={...E,schemaPath:[...E.schemaPath,g],path:E.path};if(g._zod.processJSONSchema)g._zod.processJSONSchema(_,B.schema,ee);else{let ie=B.schema,se=_.processors[R.type];if(!se)throw Error(`[toJSONSchema]: Non-representable type encountered: ${R.type}`);se(g,_,ie,ee)}let re=g._zod.parent;if(re){if(!B.ref)B.ref=re;Rn(re,_,ee),_.seen.get(re).isParent=!0}}let K=_.metadataRegistry.get(g);if(K)Qu(B.schema,K);if(_.io==="input"&&Rr(g))delete B.schema.examples,delete B.schema.default;if(_.io==="input"&&"_prefault"in B.schema)(T=B.schema).default??(T.default=B.schema._prefault);return delete B.schema._prefault,_.seen.get(g).schema}function Fy(g){return g.replace(/~/g,"~0").replace(/\//g,"~1")}function nc(g,_){let E=g.seen.get(_);if(!E)throw Error("Unprocessed schema. This is a bug in Zod.");if(g.external&&g.sharedDefsExtractedFor===g.external)return;let T=new Map;for(let B of g.seen.entries()){let Z=g.metadataRegistry.get(B[0])?.id;if(Z){let K=T.get(Z);if(K&&K!==B[0])throw Error(`Duplicate schema id "${Z}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);T.set(Z,B[0])}}let R=(B)=>{let Z=g.target==="draft-2020-12"?"$defs":"definitions";if(g.external){let re=g.external.registry.get(B[0])?.id,ie=g.external.uri??((ae)=>ae);if(re)return{ref:ie(re)};let se=B[1].defId??B[1].schema.id??`schema${g.counter++}`;return B[1].defId=se,{defId:se,ref:`${ie("__shared")}#/${Z}/${Fy(se)}`}}let K="#",X=`${K}/${Z}/`;if(B[1]===E&&!B[1].schema.id)return{ref:K};let ee=B[1].schema.id??`__schema${g.counter++}`;return{defId:ee,ref:X+Fy(ee)}},w=(B)=>{if(B[1].schema.$ref)return;let Z=B[1],{ref:K,defId:X}=R(B);if(Z.def={...Z.schema},X)Z.defId=X;let ee=Z.schema;for(let re in ee)delete ee[re];ee.$ref=K};if(g.cycles==="throw")for(let B of g.seen.entries()){let Z=B[1];if(Z.cycle)throw Error(`Cycle detected: #/${Z.cycle?.join("/")}/<root>
|
|
57
|
+
|
|
58
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let B of g.seen.entries()){let Z=B[1];if(_===B[0]){w(B);continue}if(g.external){let X=g.external.registry.get(B[0])?.id;if(_!==B[0]&&X){w(B);continue}}if(g.metadataRegistry.get(B[0])?.id){w(B);continue}if(Z.cycle){w(B);continue}if(Z.count>1){if(g.reused==="ref")w(B)}}if(g.external)g.sharedDefsExtractedFor=g.external}function qy(g){let _=g.anyOf;if(!Array.isArray(_)||_.length===0||g.type!==void 0)return;let E=[];for(let T of _){if(!T||typeof T!=="object")return;qy(T);let R=Object.keys(T);if(R.length!==1||R[0]!=="type")return;let w=T.type;for(let B of Array.isArray(w)?w:[w]){if(typeof B!=="string")return;if(!E.includes(B))E.push(B)}}delete g.anyOf,g.type=E.length===1?E[0]:E}var jy=new Set(["type","properties","required","additionalProperties"]),By=["oneOf","anyOf"];function Hy(g){let _=g.additionalProperties;if(_===void 0||_===!1||typeof _!=="object"||_===null)return null;return Object.keys(_).length?_:null}function lg(g){let _=[];for(let w of g){if(typeof w!=="object"||w.type!=="object")return null;for(let B in w)if(!jy.has(B))return null;_.push(w)}let E={},T=new Set;for(let w of _){for(let B in w.properties){if(Object.prototype.hasOwnProperty.call(E,B))continue;let Z=[];for(let X of _){let ee=X.properties?.[B]??Hy(X);if(ee===null||ee===void 0)continue;if(!Z.some((re)=>JSON.stringify(re)===JSON.stringify(ee)))Z.push(ee)}let K=Z.length===1?Z[0]:lg(Z)??{allOf:Z};Vr(E,B,K)}for(let B of w.required??[])T.add(B)}let R={type:"object",properties:E};if(T.size)R.required=[...T];if(_.every((w)=>w.additionalProperties===!1))R.additionalProperties=!1;else{let w=[];for(let B of _){let Z=Hy(B);if(Z&&!w.some((K)=>JSON.stringify(K)===JSON.stringify(Z)))w.push(Z)}if(w.length===1)R.additionalProperties=w[0];else if(w.length>1)R.additionalProperties={allOf:w}}return R}function az(g){let _=g.allOf;if(!Array.isArray(_)||_.length<2)return;for(let R of jy)if(R in g)return;let E=_.filter((R)=>By.some((w)=>Array.isArray(R[w]))),T=null;if(!E.length)T=lg(_);else{let R=E[0],w=By.find((K)=>Array.isArray(R[K]));if(Object.keys(R).length!==1)return;let B=_.filter((K)=>K!==R),Z=R[w].map((K)=>lg([...B,K]));if(Z.some((K)=>!K))return;T={[w]:Z}}if(!T)return;delete g.allOf,Qu(g,T)}function rc(g,_){let E=g.seen.get(_);if(!E)throw Error("Unprocessed schema. This is a bug in Zod.");let T=(Z)=>{let K=g.seen.get(Z);if(K.ref===null)return;let X=K.def??K.schema,ee={...X},re=K.ref;if(K.ref=null,re){T(re);let se=g.seen.get(re),ae=se.schema;if(ae.$ref&&(g.target==="draft-07"||g.target==="draft-04"||g.target==="openapi-3.0"))X.allOf=X.allOf??[],X.allOf.push(ae);else Qu(X,ae);if(Qu(X,ee),Z._zod.parent===re)for(let xe in X){if(xe==="$ref"||xe==="allOf")continue;if(!(xe in ee))delete X[xe]}if(ae.$ref&&se.def)for(let xe in X){if(xe==="$ref"||xe==="allOf")continue;if(xe in se.def&&JSON.stringify(X[xe])===JSON.stringify(se.def[xe]))delete X[xe]}}let ie=Z._zod.parent;if(ie&&ie!==re){T(ie);let se=g.seen.get(ie);if(se?.schema.$ref){if(X.$ref=se.schema.$ref,se.def)for(let ae in X){if(ae==="$ref"||ae==="allOf")continue;if(ae in se.def&&JSON.stringify(X[ae])===JSON.stringify(se.def[ae]))delete X[ae]}}}g.override({zodSchema:Z,jsonSchema:X,path:K.path??[]})};if(!g.external||g.sharedEmitDoneFor!==g.external){for(let Z of[...g.seen.entries()].reverse())T(Z[0]);if(g.target!=="openapi-3.0")for(let Z of g.seen.entries())qy(Z[1].def??Z[1].schema);for(let Z of g.deferred)Z();if(g.intersections.length){let Z=new Map;for(let K of g.seen.values())for(let X of[K.schema,K.def]){let ee=X?.allOf;if(!Array.isArray(ee))continue;let re=Z.get(ee);if(re)re.push(X);else Z.set(ee,[X])}for(let K of g.intersections)for(let X of Z.get(K)??[])az(X)}}let R={};if(g.target==="draft-2020-12")R.$schema="https://json-schema.org/draft/2020-12/schema";else if(g.target==="draft-07")R.$schema="http://json-schema.org/draft-07/schema#";else if(g.target==="draft-04")R.$schema="http://json-schema.org/draft-04/schema#";else if(g.target==="openapi-3.0");if(g.external?.uri){let Z=g.external.registry.get(_)?.id;if(!Z)throw Error("Schema is missing an `id` property");R.$id=g.external.uri(Z)}Qu(R,E.defId?E.schema:E.def??E.schema);let w=g.metadataRegistry.get(_)?.id;if(w!==void 0&&R.id===w)delete R.id;let B=g.external?.defs??{};if(!g.external||g.sharedEmitDoneFor!==g.external)for(let Z of g.seen.entries()){let K=Z[1];if(K.def&&K.defId){if(K.def.id===K.defId)delete K.def.id;Vr(B,K.defId,K.def)}}if(g.external)g.sharedEmitDoneFor=g.external;if(g.external);else if(Object.keys(B).length>0)if(g.target==="draft-2020-12")R.$defs=B;else R.definitions=B;try{let Z=JSON.parse(JSON.stringify(R));return Object.defineProperty(Z,"~standard",{value:{..._["~standard"],jsonSchema:{input:ec(_,"input",g.processors),output:ec(_,"output",g.processors)}},enumerable:!1,writable:!1}),Z}catch(Z){throw Error("Error converting schema to JSON.")}}function Rr(g,_){let E=_??{seen:new Set};if(E.seen.has(g))return!1;E.seen.add(g);let T=g._zod.def;if(T.type==="transform")return!0;if(T.type==="array")return Rr(T.element,E);if(T.type==="set")return Rr(T.valueType,E);if(T.type==="lazy")return Rr(T.getter(),E);if(T.type==="promise"||T.type==="optional"||T.type==="nonoptional"||T.type==="nullable"||T.type==="readonly"||T.type==="default"||T.type==="prefault"||T.type==="catch")return Rr(T.innerType,E);if(T.type==="intersection")return Rr(T.left,E)||Rr(T.right,E);if(T.type==="record"||T.type==="map")return Rr(T.keyType,E)||Rr(T.valueType,E);if(T.type==="pipe"){if(g._zod.traits.has("$ZodCodec"))return!0;return Rr(T.in,E)||Rr(T.out,E)}if(T.type==="object"){for(let R in T.shape)if(Rr(T.shape[R],E))return!0;return!1}if(T.type==="union"){for(let R of T.options)if(Rr(R,E))return!0;return!1}if(T.type==="tuple"){for(let R of T.items)if(Rr(R,E))return!0;if(T.rest&&Rr(T.rest,E))return!0;return!1}return!1}var Zy=(g,_={})=>(E)=>{let T=tc({...E,processors:_});return Rn(g,T),nc(T,g),rc(T,g)},ec=(g,_,E={})=>(T)=>{let{libraryOptions:R,target:w}=T??{},B=tc({...R??{},target:w,io:_,processors:E});return Rn(g,B),nc(B,g),rc(B,g)};var fa=(g,_,E)=>{if(g[_]===void 0||E>g[_])g[_]=E},ha=(g,_,E)=>{if(g[_]===void 0||E<g[_])g[_]=E},Vy=(g,_)=>{fa(g,"minimum",_),ha(g,"maximum",_)},Jy=(g,_)=>{if(g.multipleOf??(g.multipleOf=[]),!g.multipleOf.includes(_))g.multipleOf.push(_)},Xy=(g,_)=>{g.patterns??(g.patterns=new Set),g.patterns.add(_)},Qy=(g,_)=>{g.mime=g.mime?g.mime.filter((E)=>_.includes(E)):[..._]},ev=(g,_)=>{if(g.format=_,_.includes("int"))g.isInt=!0},Gy=(g,_)=>fa(g,"minimum",_.minimum),Yy=(g,_)=>ha(g,"maximum",_.maximum),Wy=(g)=>(_,E)=>{ev(_,E.format);let[T,R]=g[E.format];fa(_,"minimum",T),ha(_,"maximum",R)},uz={greater_than:(g,_)=>fa(g,_.inclusive?"minimum":"exclusiveMinimum",_.value),less_than:(g,_)=>ha(g,_.inclusive?"maximum":"exclusiveMaximum",_.value),multiple_of:(g,_)=>Jy(g,_.value),number_format:Wy(bp),bigint_format:Wy(Eh),min_length:Gy,max_length:Yy,length_equals:(g,_)=>Vy(g,_.length),min_size:Gy,max_size:Yy,size_equals:(g,_)=>Vy(g,_.size),string_format:(g,_)=>{if(ev(g,_.format),_.pattern)Xy(g,_.pattern);if(_.format==="base64"||_.format==="base64url")g.contentEncoding=_.format;if(_.local||_.precision===-1)g.laxFormat=!0},mime_type:(g,_)=>Qy(g,_.mime)};function Dr(g){let _={},E=g._zod.def,T=g._zod.traits.has("$ZodCheck")?[g,...E.checks??[]]:E.checks??[];for(let w of T)uz[w._zod.def.check]?.(_,w._zod.def);let R=g._zod.bag;if(R.minimum!==void 0)fa(_,"minimum",R.minimum);if(R.exclusiveMinimum!==void 0)fa(_,"exclusiveMinimum",R.exclusiveMinimum);if(R.maximum!==void 0)ha(_,"maximum",R.maximum);if(R.exclusiveMaximum!==void 0)ha(_,"exclusiveMaximum",R.exclusiveMaximum);if(R.multipleOf!==void 0)Jy(_,R.multipleOf);if(R.format!==void 0){if(_.format??(_.format=R.format),R.format.includes("int"))_.isInt=!0}if(R.mime)Qy(_,R.mime);for(let w of R.patterns??[])Xy(_,w);return _}var cz={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},lz=new Map([[Uh,fE],[zp,hE]]),tv=(g)=>lz.get(g)??g,mg=(g,_,E,T)=>{let R=E;R.type="string";let{minimum:w,maximum:B,format:Z,patterns:K,contentEncoding:X,laxFormat:ee}=Dr(g);if(typeof w==="number")R.minLength=w;if(typeof B==="number")R.maxLength=B;if(Z){if(R.format=cz[Z]??Z,R.format==="")delete R.format;if(Z==="time"||ee)delete R.format}if(X)R.contentEncoding=X;if(K&&K.size>0){let re=[...K].map(tv);if(re.length===1)R.pattern=re[0].source;else if(re.length>1)R.allOf=[...re.map((ie)=>({..._.target==="draft-07"||_.target==="draft-04"||_.target==="openapi-3.0"?{type:"string"}:{},pattern:ie.source}))]}},fg=(g,_,E,T)=>{let R=E,{minimum:w,maximum:B,multipleOf:Z,exclusiveMaximum:K,exclusiveMinimum:X,isInt:ee}=Dr(g);R.type=ee?"integer":"number";let re=typeof X==="number"&&X>=(w??Number.NEGATIVE_INFINITY),ie=typeof K==="number"&&K<=(B??Number.POSITIVE_INFINITY),se=_.target==="draft-04"||_.target==="openapi-3.0";if(re)if(se)R.minimum=X,R.exclusiveMinimum=!0;else R.exclusiveMinimum=X;else if(typeof w==="number")R.minimum=w;if(ie)if(se)R.maximum=K,R.exclusiveMaximum=!0;else R.exclusiveMaximum=K;else if(typeof B==="number")R.maximum=B;if(Z){let ae=new Set;for(let Ee of Z)if(Number.isFinite(Ee)&&Ee!==0)ae.add(Math.abs(Ee));else Jn(g,_,R,T,`A multipleOf divisor of ${Ee} cannot be represented in JSON Schema`);let[fe,...xe]=ae;if(fe!==void 0)R.multipleOf=fe;if(xe.length)R.allOf=[...R.allOf??[],...xe.map((Ee)=>({multipleOf:Ee}))]}},hg=(g,_,E,T)=>{E.type="boolean"},nv=(g,_,E,T)=>{Jn(g,_,E,T,"BigInt cannot be represented in JSON Schema")},rv=(g,_,E,T)=>{Jn(g,_,E,T,"Symbols cannot be represented in JSON Schema")},gg=(g,_,E,T)=>{if(_.target==="openapi-3.0")E.type="string",E.nullable=!0,E.enum=[null];else E.type="null"},bg=(g,_,E,T)=>{Jn(g,_,E,T,"Undefined cannot be represented in JSON Schema")},ov=(g,_,E,T)=>{Jn(g,_,E,T,"Void cannot be represented in JSON Schema")},Sg=(g,_,E,T)=>{E.not={}},_g=(g,_,E,T)=>{},Eg=(g,_,E,T)=>{},iv=(g,_,E,T)=>{Jn(g,_,E,T,"Date cannot be represented in JSON Schema")},Tg=(g,_,E,T)=>{let R=g._zod.def,w=Hu(R.entries);if(w.length===0){E.not={};return}if(w.every((B)=>typeof B==="number"))E.type="number";if(w.every((B)=>typeof B==="string"))E.type="string";E.enum=w},yg=(g,_,E,T)=>{let R=g._zod.def;if(R.values.length===0){E.not={};return}let w=[];for(let B of R.values)if(B===void 0){if(Jn(g,_,E,T,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof B==="bigint"){if(Jn(g,_,E,T,"BigInt literals cannot be represented in JSON Schema"))return;w.push(Number(B))}else w.push(B);if(w.length===0);else if(w.length===1){let B=w[0];if(E.type=B===null?"null":typeof B,_.target==="draft-04"||_.target==="openapi-3.0")E.enum=[B];else E.const=B}else{if(w.every((B)=>typeof B==="number"))E.type="number";if(w.every((B)=>typeof B==="string"))E.type="string";if(w.every((B)=>typeof B==="boolean"))E.type="boolean";if(w.every((B)=>B===null))E.type="null";E.enum=w}},sv=(g,_,E,T)=>{Jn(g,_,E,T,"NaN cannot be represented in JSON Schema")},av=(g,_,E,T)=>{let R=E,w=g._zod.pattern;if(!w)throw Error("Pattern not found in template literal");R.type="string",R.pattern=w.source},uv=(g,_,E,T)=>{let R=E;R.type="string",R.format="binary",R.contentEncoding="binary";let{minimum:w,maximum:B,mime:Z}=Dr(g);if(w!==void 0)R.minLength=w;if(B!==void 0)R.maxLength=B;if(!Z)return;if(Z.length===0)R.not={};else if(Z.length===1)R.contentMediaType=Z[0];else R.anyOf=Z.map((K)=>({contentMediaType:K}))},cv=(g,_,E,T)=>{E.type="boolean"},vg=(g,_,E,T)=>{Jn(g,_,E,T,"Custom types cannot be represented in JSON Schema")},lv=(g,_,E,T)=>{Jn(g,_,E,T,"Function types cannot be represented in JSON Schema")},xg=(g,_,E,T)=>{Jn(g,_,E,T,"Transforms cannot be represented in JSON Schema")},dv=(g,_,E,T)=>{Jn(g,_,E,T,"Map cannot be represented in JSON Schema")},pv=(g,_,E,T)=>{Jn(g,_,E,T,"Set cannot be represented in JSON Schema")},Rg=(g,_,E,T)=>{let R=E,w=g._zod.def,{minimum:B,maximum:Z}=Dr(g);if(typeof B==="number")R.minItems=B;if(typeof Z==="number")R.maxItems=Z;R.type="array",R.items=Rn(w.element,_,{...T,path:[...T.path,"items"]})};function oc(g){let _=g._zod.def;if(_.type==="pipe"&&_.in._zod.traits.has("$ZodTransform"))return oc(_.out);if(_.type==="catch")return oc(_.innerType);return g._zod.optin}var kg=(g,_,E,T)=>{let R=E,w=g._zod.def,B=w.shape;if(Object.getOwnPropertySymbols(B).length&&Jn(g,_,R,T,"Symbol keys cannot be represented in JSON Schema"))return;R.type="object",R.properties={};for(let X in B)Vr(R.properties,X,Rn(B[X],_,{...T,path:[...T.path,"properties",X]}));let K=[];for(let X of Object.keys(B)){let ee=w.shape[X];if(_.io==="input"?oc(ee)===void 0:ee._zod.optout===void 0)K.push(X)}if(K.length>0)R.required=K;if(w.catchall?._zod.def.type==="never")R.additionalProperties=!1;else if(!w.catchall){if(_.io==="output")R.additionalProperties=!1}else if(w.catchall)R.additionalProperties=Rn(w.catchall,_,{...T,path:[...T.path,"additionalProperties"]})},Ig=(g,_,E,T)=>{let R=g._zod.def,w=R.inclusive===!1,B=R.options.map((Z,K)=>Rn(Z,_,{...T,path:[...T.path,w?"oneOf":"anyOf",K]}));if(w)E.oneOf=B;else E.anyOf=B},Cg=(g,_,E,T)=>{let R=g._zod.def,w=Rn(R.left,_,{...T,path:[...T.path,"allOf",0]}),B=Rn(R.right,_,{...T,path:[...T.path,"allOf",1]}),Z=(X)=>("allOf"in X)&&Object.keys(X).length===1,K=[...Z(w)?w.allOf:[w],...Z(B)?B.allOf:[B]];E.allOf=K,_.intersections.push(K)},mv=(g,_,E,T)=>{let R=E,w=g._zod.def;R.type="array";let B=_.target==="draft-2020-12"?"prefixItems":"items",Z=_.target==="draft-2020-12"?"items":_.target==="openapi-3.0"?"items":"additionalItems",K=w.items.map((fe,xe)=>Rn(fe,_,{...T,path:[...T.path,B,xe]})),X=w.rest?Rn(w.rest,_,{...T,path:[...T.path,Z,..._.target==="openapi-3.0"?[w.items.length]:[]]}):null,ee=w.items.length;while(ee>0){let fe=w.items[ee-1];if(!(_.io==="input"?oc(fe)!==void 0:fe._zod.optout==="optional"))break;ee--}let re=w.items.length,ie=!w.rest;if(_.target==="draft-2020-12"){if(R.prefixItems=K,ie)R.items=!1;else if(X)R.items=X;if(ee>0)R.minItems=ee;if(ie)R.maxItems=re}else if(_.target==="openapi-3.0"){if(R.items={anyOf:K},X)R.items.anyOf.push(X);if(ee>0)R.minItems=ee;if(ie)R.maxItems=re}else{if(R.items=K,ie)R.additionalItems=!1;else if(X)R.additionalItems=X;if(ee>0)R.minItems=ee;if(ie)R.maxItems=re}let{minimum:se,maximum:ae}=Dr(g);if(typeof se==="number")R.minItems=se;if(typeof ae==="number")R.maxItems=ae};function dg(g,_,E){if(_.$ref){if(E.has(_))return _;E.add(_);let ae=g.get(_)?.def;if(!ae)return _;let fe=dg(g,ae,E);return fe===ae?_:fe}for(let ae of["anyOf","oneOf"]){let fe=_[ae];if(!Array.isArray(fe))continue;let xe=fe.map((Ee)=>dg(g,Ee,E));if(xe.some((Ee,Ae)=>Ee!==fe[Ae]))_={..._,[ae]:xe}}let T=Array.isArray(_.type)?_.type:[_.type],R=!T.includes("string")&&T.some((ae)=>ae==="number"||ae==="integer"),w=_.enum??(_.const!==void 0?[_.const]:void 0);if(!R&&!w?.some((ae)=>typeof ae==="number"))return _;let{minimum:B,maximum:Z,exclusiveMinimum:K,exclusiveMaximum:X,multipleOf:ee,format:re,id:ie,...se}=_;if(se.enum)se.enum=se.enum.map((ae)=>typeof ae==="number"?String(ae):ae);else if(typeof se.const==="number")se.const=String(se.const);if(!R)return se;if(se.type="string",!w)se.pattern=(T.includes("number")?Gu:zh).source;return se}var pg=new WeakMap;function dz(g){let _=new Map;for(let T of g.seen.values())if(T.def&&!_.has(T.schema))_.set(T.schema,T);let E=new Map;for(let T of pg.get(g)??[]){let R=g.seen.get(T),w=(R?.def??R?.schema)?.propertyNames;if(!w||w===!0||E.has(w))continue;let B=dg(_,w,new Set);if(B!==w)E.set(w,B)}if(!E.size)return;for(let T of g.seen.values())for(let R of[T.schema,T.def]){let w=R&&E.get(R.propertyNames);if(w)R.propertyNames=w}}var wg=(g,_,E,T)=>{let R=E,w=g._zod.def;R.type="object";let B=w.keyType,Z=Dr(B).patterns;if(w.mode==="loose"&&Z&&Z.size>0){let ee=Rn(w.valueType,_,{...T,path:[...T.path,"patternProperties","*"]});R.patternProperties={};for(let re of Z)Vr(R.patternProperties,tv(re).source,ee)}else{if(_.target==="draft-07"||_.target==="draft-2020-12"){R.propertyNames=Rn(w.keyType,_,{...T,path:[...T.path,"propertyNames"]});let ee=pg.get(_);if(!ee)ee=[],pg.set(_,ee),_.deferred.push(()=>dz(_));ee.push(g)}R.additionalProperties=Rn(w.valueType,_,{...T,path:[...T.path,"additionalProperties"]})}let K=B._zod.values,X=_.io==="input"&&oc(w.valueType)!==void 0;if(K&&!w.partial&&!X){let ee=[...K].filter((re)=>typeof re==="string"||typeof re==="number");if(ee.length>0)R.required=ee.map(String)}},Ag=(g,_,E,T)=>{let R=g._zod.def,w=Rn(R.innerType,_,T),B=_.seen.get(g);if(_.target==="openapi-3.0")B.ref=R.innerType,E.nullable=!0;else E.anyOf=[w,{type:"null"}]},Pg=(g,_,E,T)=>{let R=g._zod.def;Rn(R.innerType,_,T);let w=_.seen.get(g);w.ref=R.innerType},zg=Symbol();function fv(g,_,E,T,R){let w=!1,B=JSON.stringify(g,(Z,K)=>{if(typeof K!=="bigint")return K;return w=!0,null});if(!w)return JSON.parse(B);return Jn(_,E,T,R,"BigInt defaults cannot be represented in JSON Schema"),zg}var Ng=(g,_,E,T)=>{let R=g._zod.def;Rn(R.innerType,_,T);let w=_.seen.get(g);w.ref=R.innerType;let B=fv(R.defaultValue,g,_,E,T);if(B!==zg)E.default=B},Og=(g,_,E,T)=>{let R=g._zod.def;Rn(R.innerType,_,T);let w=_.seen.get(g);if(w.ref=R.innerType,_.io!=="input")return;let B=fv(R.defaultValue,g,_,E,T);if(B!==zg)E._prefault=B},Mg=(g,_,E,T)=>{let R=g._zod.def;Rn(R.innerType,_,T);let w=_.seen.get(g);w.ref=R.innerType;let B;try{B=R.catchValue(void 0)}catch{Jn(g,_,E,T,"Dynamic catch values are not supported in JSON Schema");return}E.default=B},Lg=(g,_,E,T)=>{let R=g._zod.def,w=R.in._zod.traits.has("$ZodTransform"),B=_.io==="input"?w?R.out:R.in:R.out;Rn(B,_,T);let Z=_.seen.get(g);Z.ref=B},Dg=(g,_,E,T)=>{let R=g._zod.def;Rn(R.innerType,_,T);let w=_.seen.get(g);w.ref=R.innerType,E.readOnly=!0},hv=(g,_,E,T)=>{let R=g._zod.def;Rn(R.innerType,_,T);let w=_.seen.get(g);w.ref=R.innerType},jp=(g,_,E,T)=>{let R=g._zod.def;Rn(R.innerType,_,T);let w=_.seen.get(g);w.ref=R.innerType},$g=(g,_,E,T)=>{let R=g._zod.innerType;Rn(R,_,T);let w=_.seen.get(g);w.ref=R},Ky={string:mg,number:fg,boolean:hg,bigint:nv,symbol:rv,null:gg,undefined:bg,void:ov,never:Sg,any:_g,unknown:Eg,date:iv,enum:Tg,literal:yg,nan:sv,template_literal:av,file:uv,success:cv,custom:vg,function:lv,transform:xg,map:dv,set:pv,array:Rg,object:kg,union:Ig,intersection:Cg,tuple:mv,record:wg,nullable:Ag,nonoptional:Pg,default:Ng,prefault:Og,catch:Mg,pipe:Lg,readonly:Dg,promise:hv,optional:jp,lazy:$g};function Zp(g,_){if("_idmap"in g){let T=g,R=tc({..._,processors:Ky}),w={};for(let K of T._idmap.entries()){let[X,ee]=K;Rn(ee,R)}let B={},Z={registry:T,uri:_?.uri,defs:w};R.external=Z;for(let K of T._idmap.entries()){let[X,ee]=K;nc(R,ee),Vr(B,X,rc(R,ee))}if(Object.keys(w).length>0){let K=R.target==="draft-2020-12"?"$defs":"definitions";B.__shared={[K]:w}}return{schemas:B}}let E=tc({..._,processors:Ky});return Rn(g,E),nc(E,g),rc(E,g)}var gv=new WeakSet([Object.prototype,Error.prototype]);function Vp(g,_,E){Object.defineProperty(g,_,{configurable:!0,enumerable:!1,get(){let T=E(this);return Object.defineProperty(this,_,{value:T,configurable:!0,writable:!0}),T},set(T){Object.defineProperty(this,_,{value:T,configurable:!0,writable:!0})}})}var Ez=(g,_)=>{q_.init(g,_),g.name="ZodError";let E=Object.getPrototypeOf(g);if(gv.has(E))return;gv.add(E),Vp(E,"format",(T)=>(R)=>Ih(T,R)),Vp(E,"flatten",(T)=>(R)=>kh(T,R)),Vp(E,"addIssue",(T)=>(R)=>{T.issues.push(R),T.message=JSON.stringify(T.issues,qu,2)}),Vp(E,"addIssues",(T)=>(R)=>{T.issues.push(...R),T.message=JSON.stringify(T.issues,qu,2)}),Object.defineProperty(E,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}})};var Wr=$e("ZodError",Ez,void 0,{Parent:Error});var bv=vp(Wr),Sv=xp(Wr),Gp=Rp(Wr),_v=kp(Wr),Ev=Z_(Wr),Tv=V_(Wr),yv=G_(Wr),vv=Y_(Wr),xv=W_(Wr),Rv=K_(Wr),kv=J_(Wr),Iv=X_(Wr);function yz(){if(!Mr.localeError)Lr(Gh())}function Wp(){if(!Mr.memoizer)Lr({memoizer:Vh()})}var kn=$e("ZodType",(g,_)=>(yz(),xn.init(g,_),g.def=_,g.type=_.type,g),{check(...g){let _=this.def;return this.clone(Gr(_,{checks:[..._.checks??[],...g.map((E)=>typeof E==="function"?{_zod:{check:E,def:{check:"custom"},onattach:[]}}:E)]}),{parent:!0})},with(...g){return this.check(...g)},clone(g,_){return yo(this,g,_)},brand(){return this},register(g,_){return g.add(this,_),this},refine(g,_){return this.check(cN(g,_))},superRefine(g,_){return this.check(lN(g,_))},overwrite(g){return this.check($i(g))},optional(){return bt(this)},exactOptional(){return Kz(this)},nullable(){return Av(this)},nullish(){return bt(Av(this))},nonoptional(g){return nN(this,g)},array(){return Ce(this)},or(g){return Ke([this,g])},and(g){return no(this,g)},transform(g){return Pv(this,Hv(g))},default(g){return Qz(this,g)},prefault(g){return tN(this,g)},catch(g){return oN(this,g)},pipe(g){return Pv(this,g)},readonly(){return aN(this)},describe(g){let _=this.clone();return Di.add(_,{description:g}),_},meta(...g){if(g.length===0)return Di.get(this);let _=this.clone();return Di.add(_,g[0]),_},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(g,..._){return _.length===0?g(this):g(this,..._)},get "~standard"(){return Tp(this,"~standard",{...$h(this),jsonSchema:{input:ec(this,"input"),output:ec(this,"output")}})},set "~standard"(g){si(this,"~standard",g)},parse:function g(_,E){return bv(this,_,E,{callee:g})},parseAsync:async function g(_,E){return await Sv(this,_,E,{callee:g})},safeParse(g,_){return Gp(this,g,_)},async safeParseAsync(g,_){return _v(this,g,_)},get spa(){return this?.safeParseAsync},set spa(g){si(this,"spa",g)},validate(g,_){return Ch(this,g,_)},validateAsync(g,_){return wh(this,g,_)},encode:function g(_,E){return Ev(this,_,E,{callee:g})},decode:function g(_,E){return Tv(this,_,E,{callee:g})},encodeAsync:async function g(_,E){return await yv(this,_,E,{callee:g})},decodeAsync:async function g(_,E){return await vv(this,_,E,{callee:g})},safeEncode(g,_){return xv(this,g,_)},safeDecode(g,_){return Rv(this,g,_)},async safeEncodeAsync(g,_){return kv(this,g,_)},async safeDecodeAsync(g,_){return Iv(this,g,_)},toJSONSchema(g){return Zy(this,{})(g)},get description(){return Di.get(this)?.description},get _def(){return this._zod.def}}),zv=$e("_ZodString",(g,_)=>{Pp.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>mg(g,E,T,R)},D_({format:(g)=>Dr(g).format??null,minLength:(g)=>Dr(g).minimum??null,maxLength:(g)=>Dr(g).maximum??null},{regex(...g){return this.check(Qh(...g))},includes(...g){return this.check(ng(...g))},startsWith(...g){return this.check(rg(...g))},endsWith(...g){return this.check(og(...g))},min(...g){return this.check(ma(...g))},max(...g){return this.check(Hp(...g))},length(...g){return this.check(qp(...g))},nonempty(...g){return this.check(ma(1,...g))},lowercase(g){return this.check(eg(g))},uppercase(g){return this.check(tg(g))},trim(){return this.check(sg())},normalize(...g){return this.check(ig(...g))},toLowerCase(){return this.check(ag())},toUpperCase(){return this.check(ug())},slugify(){return this.check(cg())}})),Nv=$e("ZodString",(g,_)=>{Pp.init(g,_),zv.init(g,_)},{email(g){return this.check(Wh(Lv,g))},url(g){return this.check(Kh($v,g))},jwt(g){return this.check(ky($z,g))},emoji(g){return this.check(py(xz,g))},guid(g){return this.check(ay(vz,g))},uuid(g){return this.check(uy(Yp,g))},uuidv4(g){return this.check(cy(Yp,g))},uuidv6(g){return this.check(ly(Yp,g))},uuidv7(g){return this.check(dy(Yp,g))},nanoid(g){return this.check(my(Rz,g))},cuid(g){return this.check(fy(kz,g))},cuid2(g){return this.check(hy(Iz,g))},ulid(g){return this.check(gy(Cz,g))},base64(g){return this.check(vy(Mz,g))},base64url(g){return this.check(xy(Lz,g))},xid(g){return this.check(by(wz,g))},ksuid(g){return this.check(Sy(Az,g))},ipv4(g){return this.check(_y(Pz,g))},ipv6(g){return this.check(Ey(zz,g))},cidrv4(g){return this.check(Ty(Nz,g))},cidrv6(g){return this.check(yy(Oz,g))},e164(g){return this.check(Ry(Dz,g))},datetime(g){return this.check(Dp(Fg,g))},date(g){return this.check($p(Bg,g))},time(g){return this.check(Jh(Ov,g))},duration(g){return this.check(Xh(Mv,g))}});function ne(g){return sy(Nv,g)}var On=$e("ZodStringFormat",(g,_)=>{wn.init(g,_),zv.init(g,_)}),Fg=$e("ZodISODateTime",(g,_)=>{pT.init(g,_),On.init(g,_)}),Bg=$e("ZodISODate",(g,_)=>{mT.init(g,_),On.init(g,_)}),Ov=$e("ZodISOTime",(g,_)=>{fT.init(g,_),On.init(g,_)}),Mv=$e("ZodISODuration",(g,_)=>{hT.init(g,_),On.init(g,_)}),Lv=$e("ZodEmail",(g,_)=>{tT.init(g,_),On.init(g,_)});function Dv(g){return Wh(Lv,g)}var vz=$e("ZodGUID",(g,_)=>{QE.init(g,_),On.init(g,_)});var Yp=$e("ZodUUID",(g,_)=>{eT.init(g,_),On.init(g,_)});var $v=$e("ZodURL",(g,_)=>{oT.init(g,_),On.init(g,_)});function Kp(g){return Kh($v,g)}var xz=$e("ZodEmoji",(g,_)=>{iT.init(g,_),On.init(g,_)});var Rz=$e("ZodNanoID",(g,_)=>{sT.init(g,_),On.init(g,_)});var kz=$e("ZodCUID",(g,_)=>{aT.init(g,_),On.init(g,_)});var Iz=$e("ZodCUID2",(g,_)=>{uT.init(g,_),On.init(g,_)});var Cz=$e("ZodULID",(g,_)=>{cT.init(g,_),On.init(g,_)});var wz=$e("ZodXID",(g,_)=>{lT.init(g,_),On.init(g,_)});var Az=$e("ZodKSUID",(g,_)=>{dT.init(g,_),On.init(g,_)});var Pz=$e("ZodIPv4",(g,_)=>{gT.init(g,_),On.init(g,_)});var zz=$e("ZodIPv6",(g,_)=>{ST.init(g,_),On.init(g,_)});var Nz=$e("ZodCIDRv4",(g,_)=>{_T.init(g,_),On.init(g,_)});var Oz=$e("ZodCIDRv6",(g,_)=>{ET.init(g,_),On.init(g,_)});var Mz=$e("ZodBase64",(g,_)=>{yT.init(g,_),On.init(g,_)});var Lz=$e("ZodBase64URL",(g,_)=>{vT.init(g,_),On.init(g,_)});var Dz=$e("ZodE164",(g,_)=>{xT.init(g,_),On.init(g,_)});var $z=$e("ZodJWT",(g,_)=>{RT.init(g,_),On.init(g,_)});var Jp=$e("ZodNumber",(g,_)=>{Fh.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>fg(g,E,T,R),g.isFinite=!0},D_({minValue:(g)=>{let{minimum:_,exclusiveMinimum:E}=Dr(g);return Math.max(_??Number.NEGATIVE_INFINITY,E??Number.NEGATIVE_INFINITY)},maxValue:(g)=>{let{maximum:_,exclusiveMaximum:E}=Dr(g);return Math.min(_??Number.POSITIVE_INFINITY,E??Number.POSITIVE_INFINITY)},isInt:(g)=>{let{isInt:_,multipleOf:E}=Dr(g);return!!_||!!E?.some(Number.isSafeInteger)},format:(g)=>Dr(g).format??null},{gt(g,_){return this.check(Fp(g,_))},gte(g,_){return this.check(Xu(g,_))},min(g,_){return this.check(Xu(g,_))},lt(g,_){return this.check(Up(g,_))},lte(g,_){return this.check(Ju(g,_))},max(g,_){return this.check(Ju(g,_))},int(g){return this.check(Cv(g))},safe(g){return this.check(Cv(g))},positive(g){return this.check(Fp(0,g))},nonnegative(g){return this.check(Xu(0,g))},negative(g){return this.check(Up(0,g))},nonpositive(g){return this.check(Ju(0,g))},multipleOf(g,_){return this.check(Bp(g,_))},step(g,_){return this.check(Bp(g,_))},finite(){return this}}));function Me(g){return Iy(Jp,g)}var Uz=$e("ZodNumberFormat",(g,_)=>{kT.init(g,_),Jp.init(g,_)});function Cv(g){return wy(Uz,g)}var Uv=$e("ZodBoolean",(g,_)=>{IT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>hg(g,E,T,R)});function et(g){return Ay(Uv,g)}var Fz=$e("ZodUndefined",(g,_)=>{CT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>bg(g,E,T,R)});function Hg(g){return Py(Fz,g)}var Bz=$e("ZodNull",(g,_)=>{wT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>gg(g,E,T,R)});function ai(g){return zy(Bz,g)}var Hz=$e("ZodAny",(g,_)=>{AT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>_g(g,E,T,R)});function Xp(){return Ny(Hz)}var qz=$e("ZodUnknown",(g,_)=>{PT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>Eg(g,E,T,R)});function gt(){return Oy(qz)}var jz=$e("ZodNever",(g,_)=>{zT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>Sg(g,E,T,R)});function qg(g){return My(jz,g)}var Zz=$e("ZodArray",(g,_)=>{Wp(),NT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>Rg(g,E,T,R),g.element=_.element},{min(g,_){return this.check(ma(g,_))},nonempty(g){return this.check(ma(1,g))},max(g,_){return this.check(Hp(g,_))},length(g,_){return this.check(qp(g,_))},unwrap(){return this.element}});function Ce(g,_){return Ly(Zz,g,_)}var Fv=$e("ZodObject",(g,_)=>{Wp(),LT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>kg(g,E,T,R),A2(g,"shape",(E)=>E._zod.def.shape,!1)},{keyof(){return Ot(Object.keys(this._zod.def.shape))},catchall(g){return this.clone(Gr(this._zod.def,{catchall:g}))},passthrough(){return this.clone(Gr(this._zod.def,{catchall:gt()}))},loose(){return this.clone(Gr(this._zod.def,{catchall:gt()}))},strict(){return this.clone(Gr(this._zod.def,{catchall:qg()}))},strip(){return this.clone(Gr(this._zod.def,{catchall:void 0}))},extend(g){return y2(this,g)},safeExtend(g){return v2(this,g)},merge(g){return x2(this,g)},pick(g){return E2(this,g)},omit(g){return T2(this,g)},partial(...g){return N_(qv,this,g[0])},exactPartial(...g){return N_(jv,this,g[0],"exactPartial")},required(...g){return R2(Zv,this,g[0])}});function de(g,_){let E={type:"object",shape:g??{},...zt(_)};return new Fv(E)}function xt(g,_){return new Fv({type:"object",shape:g,catchall:gt(),...zt(_)})}var Bv=$e("ZodUnion",(g,_)=>{Bh.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>Ig(g,E,T,R),g.options=_.options});function Ke(g,_){return new Bv({type:"union",options:g,...zt(_)})}var Vz=$e("ZodDiscriminatedUnion",(g,_)=>{Bv.init(g,_),DT.init(g,_)});function ui(g,_,E){return new Vz({type:"union",options:_,discriminator:g,...zt(E)})}var Gz=$e("ZodIntersection",(g,_)=>{$T.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>Cg(g,E,T,R)});function no(g,_){return new Gz({type:"intersection",left:g,right:_})}var wv=$e("ZodRecord",(g,_)=>{Wp(),UT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>wg(g,E,T,R),g.keyType=_.keyType,g.valueType=_.valueType});function je(g,_,E){if(!_||!_._zod)return new wv({type:"record",keyType:ne(),valueType:g,...zt(_)});return new wv({type:"record",keyType:g,valueType:_,...zt(E)})}var Ug=$e("ZodEnum",(g,_)=>{FT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(T,R,w)=>Tg(g,T,R,w),g.enum=_.entries,g.options=[...g._zod.values];let E=new Set(Object.keys(_.entries));g.extract=(T,R)=>{let w={};for(let B of T)if(E.has(B))w[B]=_.entries[B];else throw Error(`Key ${B} not found in enum`);return new Ug({..._,checks:[],...zt(R),entries:w})},g.exclude=(T,R)=>{let w={..._.entries};for(let B of T)if(E.has(B))delete w[B];else throw Error(`Key ${B} not found in enum`);return new Ug({..._,checks:[],...zt(R),entries:w})}});function Ot(g,_){let E=Array.isArray(g)?Object.fromEntries(g.map((T)=>[T,T])):g;return new Ug({type:"enum",entries:E,...zt(_)})}var Yz=$e("ZodLiteral",(g,_)=>{BT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>yg(g,E,T,R),g.values=new Set(_.values),Object.defineProperty(g,"value",{get(){if(_.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return _.values[0]}})});function pe(g,_){return new Yz({type:"literal",values:Array.isArray(g)?g:[g],...zt(_)})}var Wz=$e("ZodTransform",(g,_)=>{Wp(),HT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>xg(g,E,T,R),g._zod.parse=(E,T)=>{if(T.direction==="backward")throw new Vu(g.constructor.name);E.addIssue=(w)=>{if(typeof w==="string")E.issues.push(Ss(w,E.value,_));else{let B=w;if(B.fatal)B.continue=!1;if(B.code??(B.code="custom"),!("input"in B))B.input=E.value;B.inst??(B.inst=g),E.issues.push(Ss(B))}};let R=_.transform(E.value,E);if(R instanceof Promise)return R.then((w)=>(E.value=w,E));return E.value=R,E}});function Hv(g){return new Wz({type:"transform",transform:g})}var qv=$e("ZodOptional",(g,_)=>{Hh.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>jp(g,E,T,R),g.unwrap=()=>g._zod.def.innerType});function bt(g){return new qv({type:"optional",innerType:g})}var jv=$e("ZodExactOptional",(g,_)=>{qT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>jp(g,E,T,R),g.unwrap=()=>g._zod.def.innerType});function Kz(g){return new jv({type:"optional",innerType:g})}var Jz=$e("ZodNullable",(g,_)=>{jT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>Ag(g,E,T,R),g.unwrap=()=>g._zod.def.innerType});function Av(g){return new Jz({type:"nullable",innerType:g})}var Xz=$e("ZodDefault",(g,_)=>{ZT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>Ng(g,E,T,R),g.unwrap=()=>g._zod.def.innerType,g.removeDefault=g.unwrap});function Qz(g,_){return new Xz({type:"default",innerType:g,get defaultValue(){return typeof _==="function"?_():Sh(_)}})}var eN=$e("ZodPrefault",(g,_)=>{VT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>Og(g,E,T,R),g.unwrap=()=>g._zod.def.innerType});function tN(g,_){return new eN({type:"prefault",innerType:g,get defaultValue(){return typeof _==="function"?_():Sh(_)}})}var Zv=$e("ZodNonOptional",(g,_)=>{GT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>Pg(g,E,T,R),g.unwrap=()=>g._zod.def.innerType});function nN(g,_){return new Zv({type:"nonoptional",innerType:g,...zt(_)})}var rN=$e("ZodCatch",(g,_)=>{YT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>Mg(g,E,T,R),g.unwrap=()=>g._zod.def.innerType,g.removeCatch=g.unwrap});function oN(g,_){return new rN({type:"catch",innerType:g,catchValue:typeof _==="function"?_:$_(_)})}var Vv=$e("ZodPipe",(g,_)=>{qh.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>Lg(g,E,T,R),g.in=_.in,g.out=_.out});function Pv(g,_){return new Vv({type:"pipe",in:g,out:_})}var iN=$e("ZodPreprocess",(g,_)=>{Vv.init(g,_),WT.init(g,_)}),sN=$e("ZodReadonly",(g,_)=>{KT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>Dg(g,E,T,R),g.unwrap=()=>g._zod.def.innerType});function aN(g){return new sN({type:"readonly",innerType:g})}var uN=$e("ZodLazy",(g,_)=>{JT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>$g(g,E,T,R),g.unwrap=()=>g._zod.def.getter()});function ic(g){return new uN({type:"lazy",getter:g})}var Gv=$e("ZodCustom",(g,_)=>{XT.init(g,_),kn.init(g,_),g._zod.processJSONSchema=(E,T,R)=>vg(g,E,T,R)});function Yv(g,_){return Dy(Gv,g??(()=>!0),_)}function cN(g,_={}){return $y(Gv,g,_)}function lN(g,_){return Uy(g,_)}function Zo(g,_){return new iN({type:"pipe",in:Hv(g),out:_})}var Kv={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};var Wv;(function(g){})(Wv||(Wv={}));function sc(g){return Dp(Fg,g)}function pN(g){return $p(Bg,g)}function mN(g){return Cy(Jp,g)}r();r();var jg=f(void 0);function io(g){let _=d(jg);if(_===void 0&&!g)throw Error(S(47));return _}r();var fN={...co,disabled:(g)=>g.disabled,instantType:(g)=>g.instantType,openMethod:(g)=>g.openMethod,openChangeReason:(g)=>g.openChangeReason,modal:(g)=>g.modal,focusManagerModal:(g)=>g.focusManagerModal,stickIfOpen:(g)=>g.stickIfOpen,titleElementId:(g)=>g.titleElementId,descriptionElementId:(g)=>g.descriptionElementId,openOnHover:(g)=>g.openOnHover,closeDelay:(g)=>g.closeDelay,adaptiveOrigin:(g)=>g.adaptiveOrigin};class Zg extends Xe{constructor(g,_,E){let T=new ut;super(hN(g,T,_,E),gN(T),fN)}setOpen=(g,_)=>{let E=_.reason===be,T=_.reason===Bt&&_.event.detail===0,R=!g&&(_.reason===Hr||_.reason==null),w=$r(_),B=this.select("activeTriggerId");if(!g&&_.reason===ir&&_.trigger==null&&B!=null)_.trigger=this.context.triggerElements.getById(B)??this.select("activeTriggerElement")??void 0;if(this.context.onOpenChange?.(g,_),_.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(g,_);let Z=()=>{let X=Do(this.state,g,_.trigger,w());X.openChangeReason=_.reason,this.update(X)};if(E)this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(Jr,()=>{this.set("stickIfOpen",!1)}),te(Z);else Z();let K;if(T)K="click";else if(R)K="dismiss";else if(_.reason===yt)K="focus";this.set("instantType",K)}}function hN(g,_,E,T=!1){let R={...lo(_,E,T),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...g};if(R.open&&g?.mounted===void 0)R.mounted=!0;return R}function gN(g){return{popupRef:Ne(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:Ne(),beforeContentFocusGuardRef:Ne(),stickIfOpenTimeout:new me,triggerElements:g}}var Qv=oo(function({props:_}){let{children:E,open:T,defaultOpen:R=!1,onOpenChange:w,onOpenChangeComplete:B,modal:Z=!1,handle:K,triggerId:X,defaultTriggerId:ee=null}=_,re=bN(K,{modal:Z,open:R,openProp:T,activeTriggerId:ee,triggerIdProp:X});re.useControlledProp("openProp",T),re.useControlledProp("triggerIdProp",X);let ie=re.useState("open"),se=re.useState("mounted"),ae=re.useState("payload");re.useContextCallback("onOpenChange",w),re.useContextCallback("onOpenChangeComplete",B),Go(re,ie),zo(re);let{forceUnmount:fe}=Mo(ie,re,()=>{re.update({stickIfOpen:!0,openChangeReason:null})});re.useSyncedValues({modal:Z}),i(()=>{if(!ie)re.context.stickIfOpenTimeout.clear()},[re,ie]),ue(_.actionsRef,()=>({unmount:fe,close:()=>re.setOpen(!1,A(mr))}),[fe,re]);let xe=ie||se;return t(jg.Provider,{value:re,children:[K&&e(Lo,{handle:K,store:re}),xe&&e(SN,{store:re,modal:Z}),typeof E==="function"?E({payload:ae}):E]})});function ex(g){if(io(!0))return e(Qv,{props:g});return e(Pr,{children:e(Qv,{props:g})})}function bN(g,_){let E=Bo((T,R)=>new Zg(_,T,R));return i(()=>E.context.stickIfOpenTimeout.disposeEffect(),[E]),E}function SN({store:g,modal:_}){let E=g.useState("floatingRootContext"),T=ct(E,{outsidePressEvent:{mouse:_==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),{reference:R,floating:w}=T;return Fo(g,{activeTriggerProps:R,inactiveTriggerProps:R,popupProps:w}),null}r();var tx=300;r();function nx(g,_){let E=o(null);function T(w){te(()=>{g.setOpen(!1,A(yt,w.nativeEvent,w.currentTarget))}),Yr(E.current)?.focus()}function R(w){let B=g.select("positionerElement");if(B&&nt(w,B))g.context.beforeContentFocusGuardRef.current?.focus();else{te(()=>{g.setOpen(!1,A(yt,w.nativeEvent,w.currentTarget))});let Z=Kr(g.context.triggerFocusTargetRef.current||_.current);while(Z!==null&&h(B,Z)){let K=Z;if(Z=Yt(Z),Z===K)break}Z?.focus()}}return{preFocusGuardRef:E,handlePreFocusGuardFocus:T,handleFocusTargetFocus:R}}var rx=Oo(function(_,E){let{render:T,className:R,style:w,disabled:B=!1,nativeButton:Z=!0,handle:K,payload:X,openOnHover:ee=!1,delay:re=tx,closeDelay:ie=0,id:se,...ae}=_,fe=io(!0),Ee=uo(K)??fe;if(!Ee)throw Error(S(74));let Ae=L(se),Re=Ee.useState("isTriggerActive",Ae),Ve=Ee.useState("floatingRootContext"),Ge=Ee.useState("isOpenedByTrigger",Ae),ke=Ee.useState("triggerPopupId",Ae),qe=o(null),{registerTrigger:pt,isMountedByThisTrigger:ht}=No(Ae,qe,Ee,{payload:X,disabled:B,openOnHover:ee,closeDelay:ie}),Oe=Ee.useState("openChangeReason"),Rt=Ee.useState("stickIfOpen"),Nt=Ee.useState("openMethod"),mt=Ee.useState("focusManagerModal"),_t=b_(Ve,{enabled:!B&&ee&&(Nt!=="touch"||Oe!==Bt),mouseOnly:!0,move:!1,handleClose:__(),restMs:re,delay:{close:ie},triggerElementRef:qe,isActiveTrigger:Re,isClosing:()=>Ee.select("transitionStatus")==="ending"}),We=lt(Ve,{stickIfOpen:Rt}),At=ro(()=>Ee.select("open"),(Kt)=>{Ee.set("openMethod",Kt)}),Et=Ee.useState("triggerProps",ht),{getButtonProps:jt,buttonRef:Ut}=Y({disabled:B,native:Z}),ye={open(Kt){if(Kt&&Oe===Bt)return Po.open(Kt);return Ct.open(Kt)}},{preFocusGuardRef:on,handlePreFocusGuardFocus:qt,handleFocusTargetFocus:ve}=nx(Ee,qe),nn=p("button",_,{state:{disabled:B,open:Ge},ref:[Ut,E,pt,qe],props:[We.reference,_t,Et,At,{[Mt]:"",id:Ae,"aria-haspopup":"dialog","aria-expanded":Ge,"aria-controls":ke},ae,jt],stateAttributesMapping:ye}),$t=e(Q,{children:nn},Ae);if(ht&&!mt)return t(Q,{children:[e(at,{ref:on,onFocus:qt}),$t,e(at,{ref:Ee.context.triggerFocusTargetRef,onFocus:ve})]});return $t});r();r();var Vg=f(void 0);function ox(){let g=d(Vg);if(g===void 0)throw Error(S(45));return g}var ix=a(function(_,E){let{keepMounted:T=!1,...R}=_;if(!(io().useState("mounted")||T))return null;return e(Vg.Provider,{value:T,children:e(it,{ref:E,...R})})});r();r();var Gg=f(void 0);function sx(){let g=d(Gg);if(!g)throw Error(S(46));return g}var ax=a(function(_,E){let{render:T,className:R,style:w,anchor:B,positionMethod:Z,side:K,align:X,sideOffset:ee,alignOffset:re,collisionBoundary:ie="clipping-ancestors",collisionPadding:se,arrowPadding:ae,sticky:fe,disableAnchorTracking:xe=!1,collisionAvoidance:Ee=_r,...Ae}=_,Re=io(),Ve=ox(),Ge=Er(),ke=Re.useState("floatingRootContext"),qe=Re.useState("mounted"),pt=Re.useState("open"),ht=Re.useState("openChangeReason"),Oe=Re.useState("activeTriggerElement"),Rt=Re.useState("modal"),Nt=Re.useState("openMethod"),mt=Re.useState("positionerElement"),_t=Re.useState("instantType"),We=Re.useState("transitionStatus"),At=Re.useState("adaptiveOrigin"),Et=o(null),jt=Lt(mt),Ut=fo({anchor:B,floatingRootContext:ke,positionMethod:Z,mounted:qe,side:K,sideOffset:ee,align:X,alignOffset:re,arrowPadding:ae,collisionBoundary:ie,collisionPadding:se,sticky:fe,disableAnchorTracking:xe,keepMounted:Ve,nodeId:Ge,collisionAvoidance:Ee,adaptiveOrigin:At}),ye=ke.useState("domReferenceElement");c(()=>{let nn=ye,$t=Et.current;if(nn)Et.current=nn;if($t&&nn&&nn!==$t){Re.set("instantType",void 0);let Kt=new AbortController;return jt(()=>{Re.set("instantType","trigger-change")},Kt.signal),()=>{Kt.abort()}}return},[ye,jt,Re]);let on=Rt===!0&&ht!==be;mo(pt&&on,Nt==="touch",mt,Oe);let qt=Re.useStateSetter("positionerElement"),ve={open:pt,side:Ut.side,align:Ut.align,anchorHidden:Ut.anchorHidden,instant:_t},tn=po(_,ve,{styles:Ut.positionerStyles,transitionStatus:We,props:Ae,refs:[E,qt],hidden:!qe,inert:!pt});return t(Gg.Provider,{value:Ut,children:[qe&&on&&e(Pt,{inert:Je(!pt),cutout:Oe}),e(Ir,{id:Ge,children:tn})]})});r();r();var Yg=f(void 0);function ux(){let[g,_]=n(0),E=u(()=>(_((R)=>R+1),()=>{_((R)=>Math.max(0,R-1))}));return{context:l(()=>({register:E}),[E]),hasClosePart:g>0}}function cx(){let g=d(Yg);c(()=>g?.register(),[g])}var lx=a(function(_,E){let{render:T,className:R,style:w,initialFocus:B,finalFocus:Z,...K}=_,X=io(),ee=sx(),re=ho(!0)!=null,{context:ie,hasClosePart:se}=ux(),ae=X.useState("open"),fe=X.useState("openMethod"),xe=X.useState("instantType"),Ee=X.useState("transitionStatus"),Ae=X.useState("popupProps"),Re=X.useState("titleElementId"),Ve=X.useState("descriptionElementId"),Ge=X.useState("modal"),ke=X.useState("mounted"),qe=X.useState("openChangeReason"),pt=X.useState("activeTriggerElement"),ht=X.useState("floatingRootContext"),Oe=ht.useState("floatingId"),Rt=X.useState("disabled"),Nt=X.useState("openOnHover"),mt=X.useState("closeDelay");W({open:ae,ref:X.context.popupRef,onComplete(){if(ae)X.context.onOpenChangeComplete?.(!0)}}),h_(ht,{enabled:Nt&&!Rt,closeDelay:mt});let _t=B===void 0?Ro(X.context.popupRef):B,We=Ge!==!1&&se;X.useSyncedValue("focusManagerModal",We);let At=X.useStateSetter("popupElement"),Et={open:ae,side:ee.side,align:ee.align,instant:xe,transitionStatus:Ee},jt=p("div",_,{state:Et,ref:[E,X.context.popupRef,At],props:[Ae,{id:Oe,role:"dialog",...It,"aria-labelledby":Re,"aria-describedby":Ve,onKeyDown(Ut){if(re&&Ie.has(Ut.key))Ut.stopPropagation()}},Tt(Ee),K],stateAttributesMapping:wo});return e(st,{context:ht,openInteractionType:fe,modal:We,disabled:!ke||qe===be,initialFocus:_t,returnFocus:Z,restoreFocus:"popup",previousFocusableElement:O(pt)?pt:void 0,nextFocusableElement:X.context.triggerFocusTargetRef,beforeContentFocusGuardRef:X.context.beforeContentFocusGuardRef,children:e(Yg.Provider,{value:ie,children:jt})})});r();var dx=a(function(_,E){let{render:T,className:R,style:w,disabled:B=!1,nativeButton:Z=!0,...K}=_,{buttonRef:X,getButtonProps:ee}=Y({disabled:B,focusableWhenDisabled:!1,native:Z}),re=io();return cx(),p("button",_,{ref:[E,X],props:[{onClick(se){re.setOpen(!1,A(ir,se.nativeEvent))}},K,ee]})});r();function mx(){let[g,_]=n(!1);return{open:g,setOpen:_}}var Wg=f(null),fx=(g)=>{let[_,E]=n(null),T=l(()=>({anchor:_,setAnchor:E}),[_]);return e(Wg.Provider,{value:T,children:e(ex,{...g})})};fx.displayName="PopoverRoot";var hx=a(({asChild:g,children:_,...E},T)=>{let R=Ye(g,_);return e(rx,{ref:T,...R,...E})});hx.displayName="PopoverTrigger";var gx=a(({asChild:g,children:_,...E},T)=>{let R=Ye(g,_);return e(dx,{ref:T,...R,...E})});gx.displayName="PopoverClose";var bx=({asChild:g,children:_,...E})=>{let T=d(Wg),R=Ye(g,_);if(R.render)return ce(R.render,{...E,ref:T?.setAnchor});return e("div",{ref:T?.setAnchor,...E,children:_})};bx.displayName="PopoverAnchor";var{Portal:_N,EnsurePortal:EN}=Co(ix,"PopoverPortal"),TN=s("flex flex-col","cursor-default select-none rounded-medium","text-left text-body-medium text-on-surface","bg-surface-container","shadow-md3-2","origin-(--transform-origin) outline-none","transition-[opacity,scale] duration-250 ease-emphasized-decelerate","data-starting-style:scale-95 data-starting-style:opacity-0","data-ending-style:scale-95 data-ending-style:opacity-0 data-ending-style:duration-150 data-ending-style:ease-emphasized-accelerate"),Sx=a(({className:g,side:_,sideOffset:E=8,align:T,alignOffset:R,collisionPadding:w,collisionBoundary:B,collisionAvoidance:Z,sticky:K,anchor:X,positionMethod:ee,arrowPadding:re,forceMount:ie,initialFocus:se=!1,finalFocus:ae=!1,...fe},xe)=>{let Ee=d(Wg);return e(EN,{keepMounted:ie,children:e(ax,{className:"z-[9999]",side:_,sideOffset:E,align:T,alignOffset:R,collisionPadding:w,collisionBoundary:B,collisionAvoidance:Z,sticky:K,anchor:X??Ee?.anchor??void 0,positionMethod:ee,arrowPadding:re,children:e(lx,{ref:xe,initialFocus:se,finalFocus:ae,className:D(TN,g),...fe})})})});Sx.displayName="PopoverContent";var Ui={Root:fx,Trigger:hx,Content:Sx,Anchor:bx,Close:gx,Portal:_N};r();var yN=U(["flex cursor-pointer items-center gap-2 rounded-full border text-left","transition-colors duration-200 ease-standard","disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-on-surface/12 disabled:text-on-surface/38",we,wt],{variants:{variant:{default:"border-outline-variant bg-surface-container-high text-on-surface",sidebar:"border-outline-variant bg-surface-container-low text-on-surface-variant",ghost:"border-transparent bg-transparent text-on-surface-variant"},size:{sm:"h-7 px-3 text-label-medium",md:"h-8 px-3.5 text-label-large",lg:"h-10 px-4 text-label-large"},selected:{true:"border-transparent bg-secondary-container text-on-secondary-container",false:""}},defaultVariants:{variant:"default",size:"md",selected:!1}}),ac=a(({className:g,variant:_,size:E,selected:T,hideCaret:R,children:w,...B},Z)=>t("button",{ref:Z,type:"button","data-selected":T?"":void 0,className:s(yN({variant:_,size:E,selected:!!T}),g),...B,children:[T&&e(x,{name:"check",size:18}),e("span",{className:"flex flex-1 items-center gap-1.5 truncate text-left",children:w}),!R&&e(x,{name:"expand_more",size:18})]}));ac.displayName="SelectPill";var ci="outline-none focus-visible:outline-3 focus-visible:outline-secondary focus-visible:outline-offset-2",_x={initial:{height:0,opacity:0},animate:{height:"auto",opacity:1,transition:{duration:k.medium2,ease:v.emphasizedDecelerate}},exit:{height:0,opacity:0,transition:{duration:k.short4,ease:v.emphasizedAccelerate}}};function Kg({size:g=16,className:_,label:E="Loading"}){let T=g<=16?2:g<=24?3:4,R=(g-T)/2,w=2*Math.PI*R;return e("span",{role:"progressbar","aria-label":E,className:s("m3-circular-indicator inline-flex shrink-0 text-primary",_),style:{width:g,height:g},children:e("svg",{width:g,height:g,viewBox:`0 0 ${g} ${g}`,className:"animate-spin","aria-hidden":"true",children:e("circle",{cx:g/2,cy:g/2,r:R,fill:"none",stroke:"currentColor",strokeWidth:T,strokeLinecap:"round",strokeDasharray:`${w*0.7} ${w}`})})})}var vN={primary:"bg-primary-container text-on-primary-container",success:"bg-success-container text-on-success-container",error:"bg-error-container text-on-error-container",warning:"bg-warning-container text-on-warning-container",neutral:"border border-outline-variant text-on-surface-variant"};function Ex({tone:g,icon:_,children:E,className:T}){return t("span",{className:s("inline-flex h-6 shrink-0 items-center gap-1 rounded-small px-2 text-label-medium",vN[g],T),children:[_,E]})}r();var{create:xN,defineProperty:em,getOwnPropertyDescriptor:RN,getOwnPropertyNames:kN,getPrototypeOf:IN}=Object,CN=Object.prototype.hasOwnProperty,Tx=(g,_)=>()=>(_||g((_={exports:{}}).exports,_),_.exports),yx=(g,_)=>{let E={};for(var T in g)em(E,T,{get:g[T],enumerable:!0});if(_)em(E,Symbol.toStringTag,{value:"Module"});return E},wN=(g,_,E,T)=>{if(_&&typeof _==="object"||typeof _==="function"){for(var R=kN(_),w=0,B=R.length,Z;w<B;w++)if(Z=R[w],!CN.call(g,Z)&&Z!==E)em(g,Z,{get:((K)=>_[K]).bind(null,Z),enumerable:!(T=RN(_,Z))||T.enumerable})}return g},vx=(g,_,E)=>(E=g!=null?xN(IN(g)):{},wN(_||!g||!g.__esModule?em(E,"default",{value:g,enumerable:!0}):E,g));var AN=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]);function xx(g){return typeof g==="string"&&AN.has(g.replace(/#$/,""))}var tm="2025-11-25";var nm=[tm,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],rm="io.modelcontextprotocol/related-task",_s="io.modelcontextprotocol/protocolVersion",ba="io.modelcontextprotocol/clientInfo",Bi="io.modelcontextprotocol/serverInfo",Es="io.modelcontextprotocol/clientCapabilities",om="io.modelcontextprotocol/subscriptionId",Sa="io.modelcontextprotocol/logLevel";var Ts="2.0";var li=ic(()=>Ke([ne(),Me(),et(),ai(),je(ne(),li),Ce(li)])),Mn=je(ne(),li),im=Ce(li),_a=Ke([ne(),Me().int()]),Ea=ne(),uc=de({ttl:Me().optional()}),cc=de({taskId:ne()}),Ta=xt({progressToken:_a.optional(),[rm]:cc.optional()}),Qn=de({_meta:Ta.optional()}),Hi=Qn.extend({task:uc.optional()}),Ln=de({method:ne(),params:Qn.loose().optional()}),gr=de({_meta:Ta.optional()}),or=de({method:ne(),params:gr.loose().optional()}),ya=xt({get[Bi](){return Yo.optional().catch(void 0)}}),Dn=xt({_meta:ya.optional()}),vo=Ke([ne(),Me().int()]),va=de({jsonrpc:pe(Ts),id:vo,...Ln.shape}).strict(),xa=de({jsonrpc:pe(Ts),...or.shape}).strict(),ys=de({jsonrpc:pe(Ts),id:vo,result:Dn}).strict(),vs=de({jsonrpc:pe(Ts),id:vo.optional(),error:de({code:Me().int(),message:ne(),data:gt().optional()})}).strict(),xs=Ke([va,xa,ys,vs]),sm=Ke([ys,vs]),qi=Dn.strict(),lc=gr.extend({requestId:vo.optional(),reason:ne().optional()}),Ra=or.extend({method:pe("notifications/cancelled"),params:lc}),dc=de({src:ne(),mimeType:ne().optional(),sizes:Ce(ne()).optional(),theme:Ot(["light","dark"]).optional()}),di=de({icons:Ce(dc).optional()}),Vo=de({name:ne(),title:ne().optional()}),Yo=Vo.extend({...Vo.shape,...di.shape,version:ne(),websiteUrl:ne().optional(),description:ne().optional()}),PN=no(de({applyDefaults:et().optional()}),Mn),zN=Zo((g)=>{if(g&&typeof g==="object"&&!Array.isArray(g)&&Object.keys(g).length===0)return{form:{}};return g},no(de({form:PN.optional(),url:Mn.optional()}),Mn.optional())),am=xt({list:Mn.optional(),cancel:Mn.optional(),requests:xt({sampling:xt({createMessage:Mn.optional()}).optional(),elicitation:xt({create:Mn.optional()}).optional()}).optional()}),um=xt({list:Mn.optional(),cancel:Mn.optional(),requests:xt({tools:xt({call:Mn.optional()}).optional()}).optional()}),pc=de({experimental:je(ne(),Mn).optional(),sampling:de({context:Mn.optional(),tools:Mn.optional()}).optional(),elicitation:zN.optional(),roots:de({listChanged:et().optional()}).optional(),tasks:am.optional(),extensions:je(ne(),Mn).optional()}),mc=Qn.extend({protocolVersion:ne(),capabilities:pc,clientInfo:Yo}),fc=Ln.extend({method:pe("initialize"),params:mc}),ka=de({experimental:je(ne(),Mn).optional(),logging:Mn.optional(),completions:Mn.optional(),prompts:de({listChanged:et().optional()}).optional(),resources:de({subscribe:et().optional(),listChanged:et().optional()}).optional(),tools:de({listChanged:et().optional()}).optional(),tasks:um.optional(),extensions:je(ne(),Mn).optional()}),hc=Dn.extend({protocolVersion:ne(),capabilities:ka,serverInfo:Yo,instructions:ne().optional()}),gc=or.extend({method:pe("notifications/initialized"),params:gr.optional()}),bc=Ln.extend({method:pe("server/discover"),params:Qn.optional()}),Ia=Dn.extend({supportedVersions:Ce(ne()),capabilities:ka,instructions:ne().optional()}),Ca=Ln.extend({method:pe("ping"),params:Qn.optional()}),Sc=de({progress:Me(),total:bt(Me()),message:bt(ne())}),_c=de({...gr.shape,...Sc.shape,progressToken:_a}),wa=or.extend({method:pe("notifications/progress"),params:_c}),Ec=Qn.extend({cursor:Ea.optional()}),pi=Ln.extend({params:Ec.optional()}),mi=Dn.extend({nextCursor:Ea.optional()}),Aa=de({uri:ne(),mimeType:bt(ne()),_meta:je(ne(),gt()).optional()}),Pa=Aa.extend({text:ne()}),Xg=ne().refine((g)=>{try{return atob(g),!0}catch{return!1}},{message:"Invalid Base64 string"}),za=Aa.extend({blob:Xg}),fi=Ot(["user","assistant"]),Wo=de({audience:Ce(fi).optional(),priority:Me().min(0).max(1).optional(),lastModified:sc({offset:!0}).optional()}),Na=de({...Vo.shape,...di.shape,uri:ne(),description:bt(ne()),mimeType:bt(ne()),size:bt(Me()),annotations:Wo.optional(),_meta:bt(xt({}))}),Tc=de({...Vo.shape,...di.shape,uriTemplate:ne(),description:bt(ne()),mimeType:bt(ne()),annotations:Wo.optional(),_meta:bt(xt({}))}),yc=pi.extend({method:pe("resources/list")}),vc=mi.extend({resources:Ce(Na)}),xc=pi.extend({method:pe("resources/templates/list")}),Rc=mi.extend({resourceTemplates:Ce(Tc)}),Rs=Qn.extend({uri:ne()}),kc=Rs,Ic=Ln.extend({method:pe("resources/read"),params:kc}),Cc=Dn.extend({contents:Ce(Ke([Pa,za]))}),wc=or.extend({method:pe("notifications/resources/list_changed"),params:gr.optional()}),Ac=Rs,Pc=Ln.extend({method:pe("resources/subscribe"),params:Ac}),zc=Rs,Nc=Ln.extend({method:pe("resources/unsubscribe"),params:zc}),Oa=de({toolsListChanged:et().optional(),promptsListChanged:et().optional(),resourcesListChanged:et().optional(),resourceSubscriptions:Ce(ne()).optional()}),Oc=Qn.extend({notifications:Oa}),Mc=Ln.extend({method:pe("subscriptions/listen"),params:Oc}),Lc=gr.extend({notifications:Oa}),Dc=or.extend({method:pe("notifications/subscriptions/acknowledged"),params:Lc}),$c=ya.extend({[om]:vo}),Uc=Dn.extend({_meta:$c}),Fc=gr.extend({uri:ne()}),Bc=or.extend({method:pe("notifications/resources/updated"),params:Fc}),Hc=de({name:ne(),description:bt(ne()),required:bt(et())}),qc=de({...Vo.shape,...di.shape,description:bt(ne()),arguments:bt(Ce(Hc)),_meta:bt(xt({}))}),jc=pi.extend({method:pe("prompts/list")}),Zc=mi.extend({prompts:Ce(qc)}),Vc=Qn.extend({name:ne(),arguments:je(ne(),ne()).optional()}),Gc=Ln.extend({method:pe("prompts/get"),params:Vc}),ks=de({type:pe("text"),text:ne(),annotations:Wo.optional(),_meta:je(ne(),gt()).optional()}),Is=de({type:pe("image"),data:Xg,mimeType:ne(),annotations:Wo.optional(),_meta:je(ne(),gt()).optional()}),Cs=de({type:pe("audio"),data:Xg,mimeType:ne(),annotations:Wo.optional(),_meta:je(ne(),gt()).optional()}),Yc=de({type:pe("tool_use"),name:ne(),id:ne(),input:je(ne(),gt()),_meta:je(ne(),gt()).optional()}),ws=de({type:pe("resource"),resource:Ke([Pa,za]),annotations:Wo.optional(),_meta:je(ne(),gt()).optional()}),As=Na.extend({type:pe("resource_link")}),Ko=Ke([ks,Is,Cs,As,ws]),Wc=de({role:fi,content:Ko}),Kc=Dn.extend({description:ne().optional(),messages:Ce(Wc)}),Jc=or.extend({method:pe("notifications/prompts/list_changed"),params:gr.optional()}),Xc=de({title:ne().optional(),readOnlyHint:et().optional(),destructiveHint:et().optional(),idempotentHint:et().optional(),openWorldHint:et().optional()}),Qc=de({taskSupport:Ot(["required","optional","forbidden"]).optional()}),ji=de({...Vo.shape,...di.shape,description:ne().optional(),inputSchema:de({type:pe("object"),properties:je(ne(),li).optional(),required:Ce(ne()).optional()}).catchall(gt()),outputSchema:xt({$schema:ne().optional()}).optional(),annotations:Xc.optional(),execution:Qc.optional(),_meta:je(ne(),gt()).optional()}),el=pi.extend({method:pe("tools/list")}),tl=mi.extend({tools:Ce(ji)}),Zi=Dn.extend({content:Ce(Ko).default([]),structuredContent:gt().optional(),isError:et().optional()}),cm=Zi.or(Dn.extend({toolResult:gt()})),nl=Hi.extend({name:ne(),arguments:je(ne(),gt()).optional()}),rl=Ln.extend({method:pe("tools/call"),params:nl}),ol=or.extend({method:pe("notifications/tools/list_changed"),params:gr.optional()}),lm=de({autoRefresh:et().default(!0),debounceMs:Me().int().nonnegative().default(300)}),Ma=Ot(["debug","info","notice","warning","error","critical","alert","emergency"]),il=Qn.extend({level:Ma}),sl=Ln.extend({method:pe("logging/setLevel"),params:il}),al=gr.extend({level:Ma,logger:ne().optional(),data:gt()}),Ps=or.extend({method:pe("notifications/message"),params:al}),ul=de({name:ne().optional()}),cl=de({hints:Ce(ul).optional(),costPriority:Me().min(0).max(1).optional(),speedPriority:Me().min(0).max(1).optional(),intelligencePriority:Me().min(0).max(1).optional()}),ll=de({mode:Ot(["auto","required","none"]).optional()}),dl=de({type:pe("tool_result"),toolUseId:ne().describe("The unique identifier for the corresponding tool call."),content:Ce(Ko),structuredContent:gt().optional(),isError:et().optional(),_meta:je(ne(),gt()).optional()}),pl=ui("type",[ks,Is,Cs]),Fi=ui("type",[ks,Is,Cs,Yc,dl]),ml=de({role:fi,content:Ke([Fi,Ce(Fi)]),_meta:je(ne(),gt()).optional()}),fl=Hi.extend({messages:Ce(ml),modelPreferences:cl.optional(),systemPrompt:ne().optional(),includeContext:Ot(["none","thisServer","allServers"]).optional(),temperature:Me().optional(),maxTokens:Me().int(),stopSequences:Ce(ne()).optional(),metadata:Mn.optional(),tools:Ce(ji).optional(),toolChoice:ll.optional()}),hl=Ln.extend({method:pe("sampling/createMessage"),params:fl}),gl=Dn.extend({model:ne(),stopReason:bt(Ot(["endTurn","stopSequence","maxTokens"]).or(ne())),role:fi,content:pl}),bl=Dn.extend({model:ne(),stopReason:bt(Ot(["endTurn","stopSequence","maxTokens","toolUse"]).or(ne())),role:fi,content:Ke([Fi,Ce(Fi)])}),La=de({type:pe("boolean"),title:ne().optional(),description:ne().optional(),default:et().optional()}),zs=de({type:pe("string"),title:ne().optional(),description:ne().optional(),minLength:Me().optional(),maxLength:Me().optional(),format:Ot(["email","uri","date","date-time"]).optional(),default:ne().optional()}),Ns=de({type:Ot(["number","integer"]),title:ne().optional(),description:ne().optional(),minimum:Me().optional(),maximum:Me().optional(),default:Me().optional()}),Da=de({type:pe("string"),title:ne().optional(),description:ne().optional(),enum:Ce(ne()),default:ne().optional()}),$a=de({type:pe("string"),title:ne().optional(),description:ne().optional(),oneOf:Ce(de({const:ne(),title:ne()})),default:ne().optional()}),Ua=de({type:pe("string"),title:ne().optional(),description:ne().optional(),enum:Ce(ne()),enumNames:Ce(ne()).optional(),default:ne().optional()}),Sl=Ke([Da,$a]),Fa=de({type:pe("array"),title:ne().optional(),description:ne().optional(),minItems:Me().optional(),maxItems:Me().optional(),items:de({type:pe("string"),enum:Ce(ne())}),default:Ce(ne()).optional()}),Ba=de({type:pe("array"),title:ne().optional(),description:ne().optional(),minItems:Me().optional(),maxItems:Me().optional(),items:de({anyOf:Ce(de({const:ne(),title:ne()}))}),default:Ce(ne()).optional()}),_l=Ke([Fa,Ba]),El=Ke([Ua,Sl,_l]),Ha=Ke([El,La,zs,Ns]),Os=Hi.extend({mode:pe("form").optional(),message:ne(),requestedSchema:de({type:pe("object"),properties:je(ne(),Ha),required:Ce(ne()).optional()}).catchall(gt())}),Tl=Hi.extend({mode:pe("url"),message:ne(),elicitationId:ne(),url:ne().url()}),yl=Ke([Os,Tl]),vl=Ln.extend({method:pe("elicitation/create"),params:yl}),xl=gr.extend({elicitationId:ne()}),Rl=or.extend({method:pe("notifications/elicitation/complete"),params:xl}),kl=Dn.extend({action:Ot(["accept","decline","cancel"]),content:Zo((g)=>g===null?void 0:g,je(ne(),Ke([ne(),Me(),et(),Ce(ne())])).optional())}),Il=de({type:pe("ref/resource"),uri:ne()}),Cl=de({type:pe("ref/prompt"),name:ne()}),wl=Qn.extend({ref:Ke([Cl,Il]),argument:de({name:ne(),value:ne()}),context:de({arguments:je(ne(),ne()).optional()}).optional()}),Al=Ln.extend({method:pe("completion/complete"),params:wl}),Pl=Dn.extend({completion:xt({values:Ce(ne()).max(100),total:bt(Me().int()),hasMore:bt(et())})}),zl=de({uri:ne().startsWith("file://"),name:ne().optional(),_meta:je(ne(),gt()).optional()}),Nl=Ln.extend({method:pe("roots/list"),params:Qn.optional()}),Ol=Dn.extend({roots:Ce(zl)}),Ml=or.extend({method:pe("notifications/roots/list_changed"),params:gr.optional()}),dm=xt({ttl:Me().optional(),pollInterval:Me().optional()}),Ll=Ot(["working","input_required","completed","failed","cancelled"]),hi=de({taskId:ne(),status:Ll,ttl:Ke([Me(),ai()]),createdAt:ne(),lastUpdatedAt:ne(),pollInterval:bt(Me()),statusMessage:bt(ne())}),pm=Dn.extend({task:hi}),Dl=gr.merge(hi),mm=or.extend({method:pe("notifications/tasks/status"),params:Dl}),fm=Ln.extend({method:pe("tasks/get"),params:Qn.extend({taskId:ne()})}),hm=Dn.merge(hi),gm=Ln.extend({method:pe("tasks/result"),params:Qn.extend({taskId:ne()})}),bm=Dn.loose(),Sm=pi.extend({method:pe("tasks/list")}),_m=mi.extend({tasks:Ce(hi)}),Em=Ln.extend({method:pe("tasks/cancel"),params:Qn.extend({taskId:ne()})}),Tm=Dn.merge(hi),ym=Ke([Ca,fc,bc,Al,sl,Gc,jc,yc,xc,Ic,Pc,Nc,Mc,rl,el]),vm=Ke([Ra,wa,gc,Ml]),xm=Ke([qi,gl,bl,kl,Ol]),Rm=Ke([Ca,hl,vl,Nl]),km=Ke([Ra,wa,Ps,Bc,wc,ol,Jc,Dc,Rl]),Im=Ke([qi,hc,Ia,Pl,Kc,Zc,vc,Rc,Cc,Zi,tl,Uc]),Xn=Kp().superRefine((g,_)=>{if(!URL.canParse(g))return _.addIssue({code:Kv.custom,message:"URL must be parseable",fatal:!0}),vh}).refine((g)=>{let _=new URL(g);return _.protocol!=="javascript:"&&_.protocol!=="data:"&&_.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),$l=xt({resource:ne().url(),authorization_servers:Ce(Xn).optional(),jwks_uri:ne().url().optional(),scopes_supported:Ce(ne()).optional(),bearer_methods_supported:Ce(ne()).optional(),resource_signing_alg_values_supported:Ce(ne()).optional(),resource_name:ne().optional(),resource_documentation:ne().optional(),resource_policy_uri:ne().url().optional(),resource_tos_uri:ne().url().optional(),tls_client_certificate_bound_access_tokens:et().optional(),authorization_details_types_supported:Ce(ne()).optional(),dpop_signing_alg_values_supported:Ce(ne()).optional(),dpop_bound_access_tokens_required:et().optional()}),qa=xt({issuer:ne(),authorization_endpoint:Xn,token_endpoint:Xn,registration_endpoint:Xn.optional(),scopes_supported:Ce(ne()).optional(),response_types_supported:Ce(ne()),response_modes_supported:Ce(ne()).optional(),grant_types_supported:Ce(ne()).optional(),token_endpoint_auth_methods_supported:Ce(ne()).optional(),token_endpoint_auth_signing_alg_values_supported:Ce(ne()).optional(),service_documentation:Xn.optional(),revocation_endpoint:Xn.optional(),revocation_endpoint_auth_methods_supported:Ce(ne()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Ce(ne()).optional(),introspection_endpoint:ne().optional(),introspection_endpoint_auth_methods_supported:Ce(ne()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Ce(ne()).optional(),code_challenge_methods_supported:Ce(ne()).optional(),client_id_metadata_document_supported:et().optional(),authorization_response_iss_parameter_supported:et().optional().catch(void 0),dpop_signing_alg_values_supported:Ce(ne()).optional()}),Ul=xt({issuer:ne(),authorization_endpoint:Xn,token_endpoint:Xn,userinfo_endpoint:Xn.optional(),jwks_uri:Xn,registration_endpoint:Xn.optional(),scopes_supported:Ce(ne()).optional(),response_types_supported:Ce(ne()),response_modes_supported:Ce(ne()).optional(),grant_types_supported:Ce(ne()).optional(),acr_values_supported:Ce(ne()).optional(),subject_types_supported:Ce(ne()),id_token_signing_alg_values_supported:Ce(ne()),id_token_encryption_alg_values_supported:Ce(ne()).optional(),id_token_encryption_enc_values_supported:Ce(ne()).optional(),userinfo_signing_alg_values_supported:Ce(ne()).optional(),userinfo_encryption_alg_values_supported:Ce(ne()).optional(),userinfo_encryption_enc_values_supported:Ce(ne()).optional(),request_object_signing_alg_values_supported:Ce(ne()).optional(),request_object_encryption_alg_values_supported:Ce(ne()).optional(),request_object_encryption_enc_values_supported:Ce(ne()).optional(),token_endpoint_auth_methods_supported:Ce(ne()).optional(),token_endpoint_auth_signing_alg_values_supported:Ce(ne()).optional(),display_values_supported:Ce(ne()).optional(),claim_types_supported:Ce(ne()).optional(),claims_supported:Ce(ne()).optional(),service_documentation:ne().optional(),claims_locales_supported:Ce(ne()).optional(),ui_locales_supported:Ce(ne()).optional(),claims_parameter_supported:et().optional(),request_parameter_supported:et().optional(),request_uri_parameter_supported:et().optional(),require_request_uri_registration:et().optional(),op_policy_uri:Xn.optional(),op_tos_uri:Xn.optional(),client_id_metadata_document_supported:et().optional(),authorization_response_iss_parameter_supported:et().optional().catch(void 0)}),Fl=de({...Ul.shape,...qa.pick({code_challenge_methods_supported:!0}).shape}),Bl=de({access_token:ne(),id_token:ne().optional(),token_type:ne(),expires_in:mN().optional(),scope:ne().optional(),refresh_token:ne().optional(),issuer:ne().optional().catch(void 0)}).strip(),Hl=de({issued_token_type:pe("urn:ietf:params:oauth:token-type:id-jag"),access_token:ne(),token_type:ne().optional(),expires_in:Me().optional(),scope:ne().optional()}).strip(),ql=de({error:ne(),error_description:ne().optional(),error_uri:ne().optional()}),Jg=Xn.optional().or(pe("").transform(()=>{return})),jl=de({redirect_uris:Ce(Xn),token_endpoint_auth_method:ne().optional(),grant_types:Ce(ne()).optional(),response_types:Ce(ne()).optional(),application_type:ne().optional(),client_name:ne().optional(),client_uri:Xn.optional(),logo_uri:Jg,scope:ne().optional(),contacts:Ce(ne()).optional(),tos_uri:Jg,policy_uri:ne().optional(),jwks_uri:Xn.optional(),jwks:Xp().optional(),software_id:ne().optional(),software_version:ne().optional(),software_statement:ne().optional()}).strip(),Zl=de({client_id:ne(),client_secret:ne().optional(),client_id_issued_at:Me().optional(),client_secret_expires_at:Me().optional(),issuer:ne().optional().catch(void 0)}).strip(),Vl=jl.merge(Zl),Cm=de({error:ne(),error_description:ne().optional()}).strip(),wm=de({token:ne(),token_type_hint:ne().optional()}).strip();var o0=Symbol.for("mcp.sdk.errorBrands");function Ms(g,_){let E=new Set,T=_;while(typeof T==="function"){let R=T.mcpBrand;if(Object.prototype.hasOwnProperty.call(T,"mcpBrand")&&typeof R==="string")E.add(R);T=Object.getPrototypeOf(T)}if(E.size===0)return;Object.defineProperty(g,o0,{value:E,enumerable:!1,configurable:!0})}function Xr(g,_){try{if(typeof _==="object"&&_!==null&&Object.prototype.hasOwnProperty.call(g,"mcpBrand")&&typeof g.mcpBrand==="string"&&Object.prototype.hasOwnProperty.call(_,o0)){let E=_[o0];if(E&&typeof E.has==="function"&&E.has(g.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(g,_)}var NN=class g extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](_){return Xr(this,_)}static isInstance(_){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Xr(this,_)}constructor(_,E,T){super(E);this.code=_,this.errorUri=T,this.name="OAuthError",Ms(this,new.target)}toResponseObject(){let _={error:this.code,error_description:this.message};if(this.errorUri)_.error_uri=this.errorUri;return _}static fromResponse(_){return new g(_.error,_.error_description??_.error,_.error_uri)}},sr=function(g){return g.NotConnected="NOT_CONNECTED",g.AlreadyConnected="ALREADY_CONNECTED",g.NotInitialized="NOT_INITIALIZED",g.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",g.RequestTimeout="REQUEST_TIMEOUT",g.ConnectionClosed="CONNECTION_CLOSED",g.SendFailed="SEND_FAILED",g.InvalidResult="INVALID_RESULT",g.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",g.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",g.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",g.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",g.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",g.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",g.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",g.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",g.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",g.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",g.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",g}({}),Zn=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](g){return Xr(this,g)}static isInstance(g){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Xr(this,g)}constructor(g,_,E,T){super(_,T);this.code=g,this.data=E,this.name="SdkError",Ms(this,new.target)}},ON=class extends Zn{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(g,_,E,T){super(g,_,E,T);this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};var MN="2026-07-28";function Vx(g){return g>=MN}function Gx(g){let _=g.structuredContent;if(_===void 0)return g;if(!(typeof _!=="object"||_===null||Array.isArray(_)))return g;if(g.content?.some((E)=>E.type==="text")??!1)return g;return{...g,content:[...g.content??[],{type:"text",text:JSON.stringify(_)}]}}var Yx=["task","inputRequests","requestState"];function LN(g){if(g===null||typeof g!=="object"||Array.isArray(g)||g.content!==void 0||Yx.some((_)=>(_ in g)))return g;return{...g,content:[]}}function DN(){let g=ic(()=>Ke([ne(),Me(),et(),ai(),je(ne(),g),Ce(g)])),_=je(ne(),g),E=Ke([ne(),Me().int()]),T=ne(),R=de({ttl:Me().optional()}),w=de({taskId:ne()}),B=xt({progressToken:E.optional(),"io.modelcontextprotocol/related-task":w.optional()}),Z=de({_meta:B.optional()}),K=Z.extend({task:R.optional()}),X=de({method:ne(),params:Z.loose().optional()}),ee=de({_meta:B.optional()}),re=de({method:ne(),params:ee.loose().optional()}),ie=xt({_meta:B.optional()}),se=Ke([ne(),Me().int()]),ae=ie.strict(),fe=ee.extend({requestId:se.optional(),reason:ne().optional()}),xe=re.extend({method:pe("notifications/cancelled"),params:fe}),Ee=de({src:ne(),mimeType:ne().optional(),sizes:Ce(ne()).optional(),theme:Ot(["light","dark"]).optional()}),Ae=de({icons:Ce(Ee).optional()}),Re=de({name:ne(),title:ne().optional()}),Ve=Re.extend({...Re.shape,...Ae.shape,version:ne(),websiteUrl:ne().optional(),description:ne().optional()}),Ge=no(de({applyDefaults:et().optional()}),_),ke=Zo((hr)=>{if(hr&&typeof hr==="object"&&!Array.isArray(hr)&&Object.keys(hr).length===0)return{form:{}};return hr},no(de({form:Ge.optional(),url:_.optional()}),_.optional())),qe=xt({list:_.optional(),cancel:_.optional(),requests:xt({sampling:xt({createMessage:_.optional()}).optional(),elicitation:xt({create:_.optional()}).optional()}).optional()}),pt=xt({list:_.optional(),cancel:_.optional(),requests:xt({tools:xt({call:_.optional()}).optional()}).optional()}),ht=de({experimental:je(ne(),_).optional(),sampling:de({context:_.optional(),tools:_.optional()}).optional(),elicitation:ke.optional(),roots:de({listChanged:et().optional()}).optional(),tasks:qe.optional(),extensions:je(ne(),_).optional()}),Oe=Z.extend({protocolVersion:ne(),capabilities:ht,clientInfo:Ve}),Rt=X.extend({method:pe("initialize"),params:Oe}),Nt=de({experimental:je(ne(),_).optional(),logging:_.optional(),completions:_.optional(),prompts:de({listChanged:et().optional()}).optional(),resources:de({subscribe:et().optional(),listChanged:et().optional()}).optional(),tools:de({listChanged:et().optional()}).optional(),tasks:pt.optional(),extensions:je(ne(),_).optional()}),mt=ie.extend({protocolVersion:ne(),capabilities:Nt,serverInfo:Ve,instructions:ne().optional()}),_t=re.extend({method:pe("notifications/initialized"),params:ee.optional()}),We=X.extend({method:pe("ping"),params:Z.optional()}),At=de({progress:Me(),total:bt(Me()),message:bt(ne())}),Et=de({...ee.shape,...At.shape,progressToken:E}),jt=re.extend({method:pe("notifications/progress"),params:Et}),Ut=Z.extend({cursor:T.optional()}),ye=X.extend({params:Ut.optional()}),on=ie.extend({nextCursor:T.optional()}),qt=de({uri:ne(),mimeType:bt(ne()),_meta:je(ne(),gt()).optional()}),ve=qt.extend({text:ne()}),tn=ne().refine((hr)=>{try{return atob(hr),!0}catch{return!1}},{message:"Invalid Base64 string"}),nn=qt.extend({blob:tn}),$t=Ot(["user","assistant"]),Kt=de({audience:Ce($t).optional(),priority:Me().min(0).max(1).optional(),lastModified:sc({offset:!0}).optional()}),Wt=de({...Re.shape,...Ae.shape,uri:ne(),description:bt(ne()),mimeType:bt(ne()),size:bt(Me()),annotations:Kt.optional(),_meta:bt(xt({}))}),bn=de({...Re.shape,...Ae.shape,uriTemplate:ne(),description:bt(ne()),mimeType:bt(ne()),annotations:Kt.optional(),_meta:bt(xt({}))}),cn=ye.extend({method:pe("resources/list")}),un=on.extend({resources:Ce(Wt)}),Tn=ye.extend({method:pe("resources/templates/list")}),_n=on.extend({resourceTemplates:Ce(bn)}),sn=Z.extend({uri:ne()}),yn=sn,Br=X.extend({method:pe("resources/read"),params:yn}),_o=ie.extend({contents:Ce(Ke([ve,nn]))}),Ci=re.extend({method:pe("notifications/resources/list_changed"),params:ee.optional()}),is=sn,wi=X.extend({method:pe("resources/subscribe"),params:is}),Ai=sn,ss=X.extend({method:pe("resources/unsubscribe"),params:Ai}),as=ee.extend({uri:ne()}),us=re.extend({method:pe("notifications/resources/updated"),params:as}),cs=de({name:ne(),description:bt(ne()),required:bt(et())}),ls=de({...Re.shape,...Ae.shape,description:bt(ne()),arguments:bt(Ce(cs)),_meta:bt(xt({}))}),Ue=ye.extend({method:pe("prompts/list")}),ft=on.extend({prompts:Ce(ls)}),Gt=Z.extend({name:ne(),arguments:je(ne(),ne()).optional()}),Qt=X.extend({method:pe("prompts/get"),params:Gt}),$n=de({type:pe("text"),text:ne(),annotations:Kt.optional(),_meta:je(ne(),gt()).optional()}),Sn=de({type:pe("image"),data:tn,mimeType:ne(),annotations:Kt.optional(),_meta:je(ne(),gt()).optional()}),Un=de({type:pe("audio"),data:tn,mimeType:ne(),annotations:Kt.optional(),_meta:je(ne(),gt()).optional()}),dr=de({type:pe("tool_use"),name:ne(),id:ne(),input:je(ne(),gt()),_meta:je(ne(),gt()).optional()}),Nr=de({type:pe("resource"),resource:Ke([ve,nn]),annotations:Kt.optional(),_meta:je(ne(),gt()).optional()}),Eo=Wt.extend({type:pe("resource_link")}),Kn=Ke([$n,Sn,Un,Eo,Nr]),oi=de({role:$t,content:Kn}),Uo=ie.extend({description:ne().optional(),messages:Ce(oi)}),qn=re.extend({method:pe("notifications/prompts/list_changed"),params:ee.optional()}),eo=de({title:ne().optional(),readOnlyHint:et().optional(),destructiveHint:et().optional(),idempotentHint:et().optional(),openWorldHint:et().optional()}),pr=de({taskSupport:Ot(["required","optional","forbidden"]).optional()}),ds=de({...Re.shape,...Ae.shape,description:ne().optional(),inputSchema:de({type:pe("object"),properties:je(ne(),g).optional(),required:Ce(ne()).optional()}).catchall(gt()),outputSchema:de({type:pe("object"),properties:je(ne(),g).optional(),required:Ce(ne()).optional()}).catchall(gt()).optional(),annotations:eo.optional(),execution:pr.optional(),_meta:je(ne(),gt()).optional()}),na=ye.extend({method:pe("tools/list")}),ra=on.extend({tools:Ce(ds)}),oa=ie.extend({content:Ce(Kn),structuredContent:je(ne(),gt()).optional(),isError:et().optional()}),fr=K.extend({name:ne(),arguments:je(ne(),gt()).optional()}),hu=X.extend({method:pe("tools/call"),params:fr}),Gd=re.extend({method:pe("notifications/tools/list_changed"),params:ee.optional()}),ia=Ot(["debug","info","notice","warning","error","critical","alert","emergency"]),gu=Z.extend({level:ia}),bu=X.extend({method:pe("logging/setLevel"),params:gu}),Su=ee.extend({level:ia,logger:ne().optional(),data:gt()}),_u=re.extend({method:pe("notifications/message"),params:Su}),Eu=de({name:ne().optional()}),Tu=de({hints:Ce(Eu).optional(),costPriority:Me().min(0).max(1).optional(),speedPriority:Me().min(0).max(1).optional(),intelligencePriority:Me().min(0).max(1).optional()}),yu=de({mode:Ot(["auto","required","none"]).optional()}),Yd=de({type:pe("tool_result"),toolUseId:ne().describe("The unique identifier for the corresponding tool call."),content:Ce(Kn),structuredContent:de({}).loose().optional(),isError:et().optional(),_meta:je(ne(),gt()).optional()}),vu=ui("type",[$n,Sn,Un]),Pi=ui("type",[$n,Sn,Un,dr,Yd]),xu=de({role:$t,content:Ke([Pi,Ce(Pi)]),_meta:je(ne(),gt()).optional()}),Ru=K.extend({messages:Ce(xu),modelPreferences:Tu.optional(),systemPrompt:ne().optional(),includeContext:Ot(["none","thisServer","allServers"]).optional(),temperature:Me().optional(),maxTokens:Me().int(),stopSequences:Ce(ne()).optional(),metadata:_.optional(),tools:Ce(ds).optional(),toolChoice:yu.optional()}),ku=X.extend({method:pe("sampling/createMessage"),params:Ru}),Iu=ie.extend({model:ne(),stopReason:bt(Ot(["endTurn","stopSequence","maxTokens"]).or(ne())),role:$t,content:vu}),Cu=ie.extend({model:ne(),stopReason:bt(Ot(["endTurn","stopSequence","maxTokens","toolUse"]).or(ne())),role:$t,content:Ke([Pi,Ce(Pi)])}),wu=de({type:pe("boolean"),title:ne().optional(),description:ne().optional(),default:et().optional()}),Au=de({type:pe("string"),title:ne().optional(),description:ne().optional(),minLength:Me().optional(),maxLength:Me().optional(),format:Ot(["email","uri","date","date-time"]).optional(),default:ne().optional()}),Pu=de({type:Ot(["number","integer"]),title:ne().optional(),description:ne().optional(),minimum:Me().optional(),maximum:Me().optional(),default:Me().optional()}),zu=de({type:pe("string"),title:ne().optional(),description:ne().optional(),enum:Ce(ne()),default:ne().optional()}),Nu=de({type:pe("string"),title:ne().optional(),description:ne().optional(),oneOf:Ce(de({const:ne(),title:ne()})),default:ne().optional()}),Ou=de({type:pe("string"),title:ne().optional(),description:ne().optional(),enum:Ce(ne()),enumNames:Ce(ne()).optional(),default:ne().optional()}),Mu=Ke([zu,Nu]),ps=de({type:pe("array"),title:ne().optional(),description:ne().optional(),minItems:Me().optional(),maxItems:Me().optional(),items:de({type:pe("string"),enum:Ce(ne())}),default:Ce(ne()).optional()}),ms=de({type:pe("array"),title:ne().optional(),description:ne().optional(),minItems:Me().optional(),maxItems:Me().optional(),items:de({anyOf:Ce(de({const:ne(),title:ne()}))}),default:Ce(ne()).optional()}),Wd=Ke([ps,ms]),Kd=Ke([Ou,Mu,Wd]),qr=Ke([Kd,wu,Au,Pu]),jr=K.extend({mode:pe("form").optional(),message:ne(),requestedSchema:de({type:pe("object"),properties:je(ne(),qr),required:Ce(ne()).optional()}).catchall(gt())}),Lu=K.extend({mode:pe("url"),message:ne(),elicitationId:ne(),url:ne().url()}),To=Ke([jr,Lu]),Jd=X.extend({method:pe("elicitation/create"),params:To}),Xd=ee.extend({elicitationId:ne()}),Qd=re.extend({method:pe("notifications/elicitation/complete"),params:Xd}),ep=ie.extend({action:Ot(["accept","decline","cancel"]),content:Zo((hr)=>hr===null?void 0:hr,je(ne(),Ke([ne(),Me(),et(),Ce(ne())])).optional())}),tp=de({type:pe("ref/resource"),uri:ne()}),np=de({type:pe("ref/prompt"),name:ne()}),rp=Z.extend({ref:Ke([np,tp]),argument:de({name:ne(),value:ne()}),context:de({arguments:je(ne(),ne()).optional()}).optional()}),Du=X.extend({method:pe("completion/complete"),params:rp}),op=ie.extend({completion:xt({values:Ce(ne()).max(100),total:bt(Me().int()),hasMore:bt(et())})}),ip=de({uri:ne().startsWith("file://"),name:ne().optional(),_meta:je(ne(),gt()).optional()}),sa=X.extend({method:pe("roots/list"),params:Z.optional()}),$u=ie.extend({roots:Ce(ip)}),sp=re.extend({method:pe("notifications/roots/list_changed"),params:ee.optional()}),ap=xt({ttl:Me().optional(),pollInterval:Me().optional()}),Uu=Ot(["working","input_required","completed","failed","cancelled"]),zi=de({taskId:ne(),status:Uu,ttl:Ke([Me(),ai()]),createdAt:ne(),lastUpdatedAt:ne(),pollInterval:bt(Me()),statusMessage:bt(ne())}),Or=ie.extend({task:zi}),up=ee.merge(zi),fs=re.extend({method:pe("notifications/tasks/status"),params:up}),aa=X.extend({method:pe("tasks/get"),params:Z.extend({taskId:ne()})}),ua=ie.merge(zi),ca=X.extend({method:pe("tasks/result"),params:Z.extend({taskId:ne()})}),ph=ie.loose(),vr=ye.extend({method:pe("tasks/list")}),jn=on.extend({tasks:Ce(zi)}),hs=X.extend({method:pe("tasks/cancel"),params:Z.extend({taskId:ne()})});return{JSONValueSchema:g,JSONObjectSchema:_,ProgressTokenSchema:E,CursorSchema:T,TaskMetadataSchema:R,RelatedTaskMetadataSchema:w,RequestMetaSchema:B,BaseRequestParamsSchema:Z,TaskAugmentedRequestParamsSchema:K,RequestSchema:X,NotificationsParamsSchema:ee,NotificationSchema:re,ResultSchema:ie,RequestIdSchema:se,EmptyResultSchema:ae,CancelledNotificationParamsSchema:fe,CancelledNotificationSchema:xe,IconSchema:Ee,IconsSchema:Ae,BaseMetadataSchema:Re,ImplementationSchema:Ve,ClientTasksCapabilitySchema:qe,ServerTasksCapabilitySchema:pt,ClientCapabilitiesSchema:ht,InitializeRequestParamsSchema:Oe,InitializeRequestSchema:Rt,ServerCapabilitiesSchema:Nt,InitializeResultSchema:mt,InitializedNotificationSchema:_t,PingRequestSchema:We,ProgressSchema:At,ProgressNotificationParamsSchema:Et,ProgressNotificationSchema:jt,PaginatedRequestParamsSchema:Ut,PaginatedRequestSchema:ye,PaginatedResultSchema:on,ResourceContentsSchema:qt,TextResourceContentsSchema:ve,BlobResourceContentsSchema:nn,RoleSchema:$t,AnnotationsSchema:Kt,ResourceSchema:Wt,ResourceTemplateSchema:bn,ListResourcesRequestSchema:cn,ListResourcesResultSchema:un,ListResourceTemplatesRequestSchema:Tn,ListResourceTemplatesResultSchema:_n,ResourceRequestParamsSchema:sn,ReadResourceRequestParamsSchema:yn,ReadResourceRequestSchema:Br,ReadResourceResultSchema:_o,ResourceListChangedNotificationSchema:Ci,SubscribeRequestParamsSchema:is,SubscribeRequestSchema:wi,UnsubscribeRequestParamsSchema:Ai,UnsubscribeRequestSchema:ss,ResourceUpdatedNotificationParamsSchema:as,ResourceUpdatedNotificationSchema:us,PromptArgumentSchema:cs,PromptSchema:ls,ListPromptsRequestSchema:Ue,ListPromptsResultSchema:ft,GetPromptRequestParamsSchema:Gt,GetPromptRequestSchema:Qt,TextContentSchema:$n,ImageContentSchema:Sn,AudioContentSchema:Un,ToolUseContentSchema:dr,EmbeddedResourceSchema:Nr,ResourceLinkSchema:Eo,ContentBlockSchema:Kn,PromptMessageSchema:oi,GetPromptResultSchema:Uo,PromptListChangedNotificationSchema:qn,ToolAnnotationsSchema:eo,ToolExecutionSchema:pr,ToolSchema:ds,ListToolsRequestSchema:na,ListToolsResultSchema:ra,CallToolResultSchema:oa,CallToolRequestParamsSchema:fr,CallToolRequestSchema:hu,ToolListChangedNotificationSchema:Gd,LoggingLevelSchema:ia,SetLevelRequestParamsSchema:gu,SetLevelRequestSchema:bu,LoggingMessageNotificationParamsSchema:Su,LoggingMessageNotificationSchema:_u,ModelHintSchema:Eu,ModelPreferencesSchema:Tu,ToolChoiceSchema:yu,ToolResultContentSchema:Yd,SamplingContentSchema:vu,SamplingMessageContentBlockSchema:Pi,SamplingMessageSchema:xu,CreateMessageRequestParamsSchema:Ru,CreateMessageRequestSchema:ku,CreateMessageResultSchema:Iu,CreateMessageResultWithToolsSchema:Cu,BooleanSchemaSchema:wu,StringSchemaSchema:Au,NumberSchemaSchema:Pu,UntitledSingleSelectEnumSchemaSchema:zu,TitledSingleSelectEnumSchemaSchema:Nu,LegacyTitledEnumSchemaSchema:Ou,SingleSelectEnumSchemaSchema:Mu,UntitledMultiSelectEnumSchemaSchema:ps,TitledMultiSelectEnumSchemaSchema:ms,MultiSelectEnumSchemaSchema:Wd,EnumSchemaSchema:Kd,PrimitiveSchemaDefinitionSchema:qr,ElicitRequestFormParamsSchema:jr,ElicitRequestURLParamsSchema:Lu,ElicitRequestParamsSchema:To,ElicitRequestSchema:Jd,ElicitationCompleteNotificationParamsSchema:Xd,ElicitationCompleteNotificationSchema:Qd,ElicitResultSchema:ep,ResourceTemplateReferenceSchema:tp,PromptReferenceSchema:np,CompleteRequestParamsSchema:rp,CompleteRequestSchema:Du,CompleteResultSchema:op,RootSchema:ip,ListRootsRequestSchema:sa,ListRootsResultSchema:$u,RootsListChangedNotificationSchema:sp,TaskCreationParamsSchema:ap,TaskStatusSchema:Uu,TaskSchema:zi,CreateTaskResultSchema:Or,TaskStatusNotificationParamsSchema:up,TaskStatusNotificationSchema:fs,GetTaskRequestSchema:aa,GetTaskResultSchema:ua,GetTaskPayloadRequestSchema:ca,GetTaskPayloadResultSchema:ph,ListTasksRequestSchema:vr,ListTasksResultSchema:jn,CancelTaskRequestSchema:hs,CancelTaskResultSchema:ie.merge(zi),ClientRequestSchema:Ke([We,Rt,Du,bu,Qt,Ue,cn,Tn,Br,wi,ss,hu,na,aa,ca,vr,hs]),ClientNotificationSchema:Ke([xe,jt,_t,sp,fs]),ClientResultSchema:Ke([ae,Iu,Cu,ep,$u,ua,jn,Or]),ServerRequestSchema:Ke([We,ku,Jd,sa,aa,ca,vr,hs]),ServerNotificationSchema:Ke([xe,jt,_u,us,Ci,Gd,qn,fs,Qd]),ServerResultSchema:Ke([ae,mt,op,Uo,ft,un,_n,_o,oa,ra,ua,jn,Or]),CallToolResultWireSchema:gt().superRefine((hr,f2)=>{if(typeof hr!=="object"||hr===null||Array.isArray(hr)||hr.content!==void 0)return;for(let m_ of Yx)if(m_ in hr){f2.addIssue({code:"custom",message:`content is required when the body carries '${m_}' — another result family cannot default into an empty tools/call success`});return}}).transform(LN).pipe(oa)}}var $N;function Wx(){return $N??=DN()}function Kx(g){return g.type!=="object"}var UN=new Set(["const","enum","default","examples"]),FN=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function Mx(g){return g!==void 0&&!(typeof g==="string"&&g.startsWith("#"))}function BN(g){let _=typeof g.$schema==="string"?g.$schema:void 0;if(Mx(g.$id))return{..._!==void 0&&{$schema:_},type:"object",properties:{result:g},required:["result"]};let E=xx(g.$schema)&&g.$recursiveAnchor!==!0,T=(R,w)=>{if(Array.isArray(R))return R.map((K)=>T(K,!1));if(R===null||typeof R!=="object")return R;if(!w&&Mx(R.$id))return R;let B={},Z=!1;for(let[K,X]of Object.entries(R))if(w)B[K]=T(X,!1);else if((K==="$ref"||K==="$dynamicRef")&&typeof X==="string")B[K]=X==="#"?"#/properties/result":X.startsWith("#/")?`#/properties/result${X.slice(1)}`:X;else if(K==="$recursiveRef"&&X==="#"&&E)Z=!0;else if(UN.has(K))B[K]=X;else if(FN.has(K))B[K]=T(X,!0);else B[K]=T(X,!1);if(Z)if("$ref"in B)B.allOf=[...Array.isArray(B.allOf)?B.allOf:[],{$ref:"#/properties/result"}];else B.$ref="#/properties/result";return B};return{..._!==void 0&&{$schema:_},type:"object",properties:{result:T(g,!1)},required:["result"]}}var Jx={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Xx={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},HN={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Am;function l0(){if(Am)return Am;let g=Wx();return Am={requestSchemas:{ping:g.PingRequestSchema,initialize:g.InitializeRequestSchema,"completion/complete":g.CompleteRequestSchema,"logging/setLevel":g.SetLevelRequestSchema,"prompts/get":g.GetPromptRequestSchema,"prompts/list":g.ListPromptsRequestSchema,"resources/list":g.ListResourcesRequestSchema,"resources/templates/list":g.ListResourceTemplatesRequestSchema,"resources/read":g.ReadResourceRequestSchema,"resources/subscribe":g.SubscribeRequestSchema,"resources/unsubscribe":g.UnsubscribeRequestSchema,"tools/call":g.CallToolRequestSchema,"tools/list":g.ListToolsRequestSchema,"tasks/get":g.GetTaskRequestSchema,"tasks/result":g.GetTaskPayloadRequestSchema,"tasks/list":g.ListTasksRequestSchema,"tasks/cancel":g.CancelTaskRequestSchema,"sampling/createMessage":g.CreateMessageRequestSchema,"elicitation/create":g.ElicitRequestSchema,"roots/list":g.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":g.CancelledNotificationSchema,"notifications/progress":g.ProgressNotificationSchema,"notifications/initialized":g.InitializedNotificationSchema,"notifications/roots/list_changed":g.RootsListChangedNotificationSchema,"notifications/tasks/status":g.TaskStatusNotificationSchema,"notifications/message":g.LoggingMessageNotificationSchema,"notifications/resources/updated":g.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":g.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":g.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":g.PromptListChangedNotificationSchema,"notifications/elicitation/complete":g.ElicitationCompleteNotificationSchema},resultSchemas:{ping:g.EmptyResultSchema,initialize:g.InitializeResultSchema,"completion/complete":g.CompleteResultSchema,"logging/setLevel":g.EmptyResultSchema,"prompts/get":g.GetPromptResultSchema,"prompts/list":g.ListPromptsResultSchema,"resources/list":g.ListResourcesResultSchema,"resources/templates/list":g.ListResourceTemplatesResultSchema,"resources/read":g.ReadResourceResultSchema,"resources/subscribe":g.EmptyResultSchema,"resources/unsubscribe":g.EmptyResultSchema,"tools/call":g.CallToolResultWireSchema,"tools/list":g.ListToolsResultSchema,"sampling/createMessage":g.CreateMessageResultWithToolsSchema,"elicitation/create":g.ElicitResultSchema,"roots/list":g.ListRootsResultSchema}},Am}function Qx(g){return Object.prototype.hasOwnProperty.call(Jx,g)}function eR(g){return Object.prototype.hasOwnProperty.call(Xx,g)}function qN(g){return Object.prototype.hasOwnProperty.call(HN,g)}function jN(g){return qN(g)?l0().resultSchemas[g]:void 0}function ZN(g){return Qx(g)?l0().requestSchemas[g]:void 0}function VN(g){return eR(g)?l0().notificationSchemas[g]:void 0}var JV=Object.keys(Jx),XV=Object.keys(Xx);function i0(g){return g!==null&&typeof g==="object"&&!Array.isArray(g)}function Pm(g,_){if(g===void 0)return{ok:!1,reason:"not-in-era"};let E=g.safeParse(_);return E.success?{ok:!0,value:E.data}:{ok:!1,reason:"invalid",message:String(E.error)}}var Lx={ok:!1,reason:"not-in-era"};function Dx(g){return i0(g)&&i0(g.outputSchema)&&Kx(g.outputSchema)}function $x(g){return g}var d0={era:"2025-11-25",hasRequestMethod:Qx,hasNotificationMethod:eR,validateRequest:(g,_)=>Pm(ZN(g),_),validateResult:(g,_)=>Pm(jN(g),_),validateNotification:(g,_)=>Pm(VN(g),_),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Lx,validateInputResponse:()=>Lx,samplingResultVariant:(g,_)=>{let E=Wx();return Pm(g?E.CreateMessageResultWithToolsSchema:E.CreateMessageResultSchema,_)},outboundEnvelope:(g)=>{return},validateEnvelopeMeta:(g)=>[],projectCallToolResult(g,_){let E=Gx(g),T=E.structuredContent;if(T===void 0)return E;let R=typeof T!=="object"||T===null||Array.isArray(T),w=_!==void 0&&Kx(_);if(!R&&!w)return E;return{...E,structuredContent:{result:T}}},decodeResult(g,_){if(i0(_)&&"resultType"in _){let E={..._};return delete E.resultType,{kind:"complete",result:$x(E)}}return{kind:"complete",result:$x(_)}},encodeResult(g,_){if(g!=="tools/list")return _;let E=_.tools;if(!Array.isArray(E)||!E.some((T)=>Dx(T)))return _;return{..._,tools:E.map((T)=>Dx(T)?{...T,outputSchema:BN(T.outputSchema)}:T)}},encodeErrorCode:(g)=>g===-32002?-32602:g,checkInboundEnvelope:(g)=>{return}};function GN(){let g=ic(()=>Ke([ne(),Me(),et(),ai(),je(ne(),g),Ce(g)])),_=je(ne(),g),E=Ke([ne(),Me().int()]),T=ne(),R=Ke([ne(),Me().int()]),w=Ot(["user","assistant"]),B=Ot(["debug","info","notice","warning","error","critical","alert","emergency"]),Z=ne().refine((jn)=>{try{return atob(jn),!0}catch{return!1}},{message:"Invalid Base64 string"}),K=de({ttl:Me().optional()}),X=de({taskId:ne()}),ee=xt({progressToken:E.optional(),"io.modelcontextprotocol/related-task":X.optional()}),re=de({_meta:ee.optional()}),ie=re.extend({task:K.optional()}),se=de({_meta:ee.optional()}),ae=de({method:ne(),params:se.loose().optional()}),fe=de({src:ne(),mimeType:ne().optional(),sizes:Ce(ne()).optional(),theme:Ot(["light","dark"]).optional()}),xe=de({icons:Ce(fe).optional()}),Ee=de({name:ne(),title:ne().optional()}),Ae=Ee.extend({...Ee.shape,...xe.shape,version:ne(),websiteUrl:ne().optional(),description:ne().optional()}),Re=no(de({applyDefaults:et().optional()}),_),Ve=Zo((jn)=>{if(jn&&typeof jn==="object"&&!Array.isArray(jn)&&Object.keys(jn).length===0)return{form:{}};return jn},no(de({form:Re.optional(),url:_.optional()}),_.optional())),Ge=xt({list:_.optional(),cancel:_.optional(),requests:xt({sampling:xt({createMessage:_.optional()}).optional(),elicitation:xt({create:_.optional()}).optional()}).optional()}),ke=xt({list:_.optional(),cancel:_.optional(),requests:xt({tools:xt({call:_.optional()}).optional()}).optional()}),qe=de({experimental:je(ne(),_).optional(),sampling:de({context:_.optional(),tools:_.optional()}).optional(),elicitation:Ve.optional(),roots:de({listChanged:et().optional()}).optional(),tasks:Ge.optional(),extensions:je(ne(),_).optional()}),pt=de({experimental:je(ne(),_).optional(),logging:_.optional(),completions:_.optional(),prompts:de({listChanged:et().optional()}).optional(),resources:de({subscribe:et().optional(),listChanged:et().optional()}).optional(),tools:de({listChanged:et().optional()}).optional(),tasks:ke.optional(),extensions:je(ne(),_).optional()}),ht=de({progress:Me(),total:bt(Me()),message:bt(ne())}),Oe=de({...se.shape,...ht.shape,progressToken:E}),Rt=ae.extend({method:pe("notifications/progress"),params:Oe}),Nt=se.extend({level:B,logger:ne().optional(),data:gt()}),mt=ae.extend({method:pe("notifications/message"),params:Nt}),_t=de({uri:ne(),mimeType:bt(ne()),_meta:je(ne(),gt()).optional()}),We=_t.extend({text:ne()}),At=_t.extend({blob:Z}),Et=de({audience:Ce(w).optional(),priority:Me().min(0).max(1).optional(),lastModified:sc({offset:!0}).optional()}),jt=de({...Ee.shape,...xe.shape,uri:ne(),description:bt(ne()),mimeType:bt(ne()),size:bt(Me()),annotations:Et.optional(),_meta:bt(xt({}))}),Ut=de({...Ee.shape,...xe.shape,uriTemplate:ne(),description:bt(ne()),mimeType:bt(ne()),annotations:Et.optional(),_meta:bt(xt({}))}),ye=ae.extend({method:pe("notifications/resources/list_changed"),params:se.optional()}),on=se.extend({uri:ne()}),qt=ae.extend({method:pe("notifications/resources/updated"),params:on}),ve=de({name:ne(),description:bt(ne()),required:bt(et())}),tn=de({...Ee.shape,...xe.shape,description:bt(ne()),arguments:bt(Ce(ve)),_meta:bt(xt({}))}),nn=ae.extend({method:pe("notifications/prompts/list_changed"),params:se.optional()}),$t=de({type:pe("text"),text:ne(),annotations:Et.optional(),_meta:je(ne(),gt()).optional()}),Kt=de({type:pe("image"),data:Z,mimeType:ne(),annotations:Et.optional(),_meta:je(ne(),gt()).optional()}),Wt=de({type:pe("audio"),data:Z,mimeType:ne(),annotations:Et.optional(),_meta:je(ne(),gt()).optional()}),bn=de({type:pe("tool_use"),name:ne(),id:ne(),input:je(ne(),gt()),_meta:je(ne(),gt()).optional()}),cn=de({type:pe("resource"),resource:Ke([We,At]),annotations:Et.optional(),_meta:je(ne(),gt()).optional()}),un=jt.extend({type:pe("resource_link")}),Tn=Ke([$t,Kt,Wt,un,cn]),_n=de({role:w,content:Tn}),sn=de({title:ne().optional(),readOnlyHint:et().optional(),destructiveHint:et().optional(),idempotentHint:et().optional(),openWorldHint:et().optional()}),yn=ae.extend({method:pe("notifications/tools/list_changed"),params:se.optional()}),Br=de({name:ne().optional()}),_o=de({hints:Ce(Br).optional(),costPriority:Me().min(0).max(1).optional(),speedPriority:Me().min(0).max(1).optional(),intelligencePriority:Me().min(0).max(1).optional()}),Ci=de({mode:Ot(["auto","required","none"]).optional()}),is=de({type:pe("boolean"),title:ne().optional(),description:ne().optional(),default:et().optional()}),wi=de({type:pe("string"),title:ne().optional(),description:ne().optional(),minLength:Me().optional(),maxLength:Me().optional(),format:Ot(["email","uri","date","date-time"]).optional(),default:ne().optional()}),Ai=de({type:Ot(["number","integer"]),title:ne().optional(),description:ne().optional(),minimum:Me().optional(),maximum:Me().optional(),default:Me().optional()}),ss=de({type:pe("string"),title:ne().optional(),description:ne().optional(),enum:Ce(ne()),default:ne().optional()}),as=de({type:pe("string"),title:ne().optional(),description:ne().optional(),oneOf:Ce(de({const:ne(),title:ne()})),default:ne().optional()}),us=de({type:pe("string"),title:ne().optional(),description:ne().optional(),enum:Ce(ne()),enumNames:Ce(ne()).optional(),default:ne().optional()}),cs=Ke([ss,as]),ls=de({type:pe("array"),title:ne().optional(),description:ne().optional(),minItems:Me().optional(),maxItems:Me().optional(),items:de({type:pe("string"),enum:Ce(ne())}),default:Ce(ne()).optional()}),Ue=de({type:pe("array"),title:ne().optional(),description:ne().optional(),minItems:Me().optional(),maxItems:Me().optional(),items:de({anyOf:Ce(de({const:ne(),title:ne()}))}),default:Ce(ne()).optional()}),ft=Ke([ls,Ue]),Gt=Ke([us,cs,ft]),Qt=Ke([Gt,is,wi,Ai]),$n=ie.extend({mode:pe("form").optional(),message:ne(),requestedSchema:de({type:pe("object"),properties:je(ne(),Qt),required:Ce(ne()).optional()}).catchall(gt())}),Sn=de({type:pe("ref/resource"),uri:ne()}),Un=de({type:pe("ref/prompt"),name:ne()}),dr=de({uri:ne().startsWith("file://"),name:ne().optional(),_meta:je(ne(),gt()).optional()}),Nr=qe.shape,Eo=de({experimental:Nr.experimental,sampling:Nr.sampling,elicitation:Nr.elicitation,roots:Nr.roots,extensions:Nr.extensions}),Kn=pt.shape,oi=de({experimental:Kn.experimental,logging:Kn.logging,completions:Kn.completions,prompts:Kn.prompts,resources:Kn.resources,tools:Kn.tools,extensions:Kn.extensions}),Uo=xt({progressToken:E.optional(),[_s]:ne(),[ba]:Ae.optional(),[Es]:Eo,[Sa]:B.optional()}),qn=de({...Ee.shape,...xe.shape,description:ne().optional(),inputSchema:xt({$schema:ne().optional(),type:pe("object")}),outputSchema:xt({$schema:ne().optional()}).optional(),annotations:sn.optional(),_meta:je(ne(),gt()).optional()}),eo=de({type:pe("tool_result"),toolUseId:ne(),content:Ce(Tn),structuredContent:gt().optional(),isError:et().optional(),_meta:je(ne(),gt()).optional()}),pr=Ke([$t,Kt,Wt,bn,eo]),ds=de({role:w,content:Ke([pr,Ce(pr)]),_meta:je(ne(),gt()).optional()}),na=ne(),ra=xt({[Bi]:Ae.optional().catch(void 0)}),oa=ra.optional();function fr(jn){return xt({_meta:oa,resultType:na.default("complete"),...jn})}let hu=fr({}),Gd=fr({nextCursor:T.optional()}),ia=fr({content:Ce(Tn),structuredContent:gt().optional(),isError:et().optional()}),gu=fr({ttlMs:Me().int().min(0),cacheScope:Ot(["public","private"]),tools:Ce(qn),nextCursor:T.optional()}),bu=fr({ttlMs:Me().int().min(0),cacheScope:Ot(["public","private"]),prompts:Ce(tn),nextCursor:T.optional()}),Su=fr({description:ne().optional(),messages:Ce(_n)}),_u=fr({ttlMs:Me().int().min(0),cacheScope:Ot(["public","private"]),resources:Ce(jt),nextCursor:T.optional()}),Eu=fr({ttlMs:Me().int().min(0),cacheScope:Ot(["public","private"]),resourceTemplates:Ce(Ut),nextCursor:T.optional()}),Tu=fr({ttlMs:Me().int().min(0),cacheScope:Ot(["public","private"]),contents:Ce(Ke([We,At]))}),yu=fr({completion:de({values:Ce(ne()).max(100),total:Me().int().optional(),hasMore:et().optional()}).loose()}),Yd=fr({ttlMs:Me().int().min(0),cacheScope:Ot(["public","private"])}),vu=fr({ttlMs:Me().int().min(0).catch(0),cacheScope:Ot(["public","private"]).catch("private"),supportedVersions:Ce(ne()),capabilities:oi,instructions:ne().optional()}),Pi=de({messages:Ce(ds),modelPreferences:_o.optional(),systemPrompt:ne().optional(),includeContext:Ot(["none","thisServer","allServers"]).optional(),temperature:Me().optional(),maxTokens:Me().int(),stopSequences:Ce(ne()).optional(),metadata:_.optional(),tools:Ce(qn).optional(),toolChoice:Ci.optional()}),xu=de({method:pe("sampling/createMessage"),params:Pi}),Ru=de({method:pe("roots/list"),params:de({_meta:je(ne(),gt()).optional()}).optional()}),ku=de({...ds.shape,model:ne(),stopReason:ne().optional()}),Iu=de({roots:Ce(dr)}),Cu=de({action:Ot(["accept","decline","cancel"]),content:je(ne(),Ke([ne(),Me(),et(),Ce(ne())])).optional()}),wu=de({mode:pe("url"),message:ne(),url:ne().url()}),Au=Ke([$n,wu]),Pu=de({method:pe("elicitation/create"),params:Au}),zu=Ke([xu,Ru,Pu]),Nu=Ke([ku,Iu,Cu]),Ou=je(ne(),zu),Mu=je(ne(),Nu),ps=fr({inputRequests:Ou.optional(),requestState:ne().optional()}),ms={inputResponses:Mu.optional(),requestState:ne().optional()},Wd=de({_meta:Uo,...ms}),Kd=xt({progressToken:E.optional()});function qr(jn,hs){return de({method:pe(jn),params:de({_meta:Uo,...hs})})}function jr(jn,hs){return de({method:pe(jn),params:de({_meta:Kd.optional(),...hs}).optional()})}let Lu={name:ne(),arguments:je(ne(),gt()).optional(),...ms},To={cursor:T.optional()},Jd=qr("tools/call",Lu),Xd=qr("tools/list",To),Qd=qr("prompts/list",To),ep=qr("prompts/get",{name:ne(),arguments:je(ne(),ne()).optional(),...ms}),tp=qr("resources/list",To),np=qr("resources/templates/list",To),rp=qr("resources/read",{uri:ne(),...ms}),Du={ref:Ke([Un,Sn]),argument:de({name:ne(),value:ne()}),context:de({arguments:je(ne(),ne()).optional()}).optional()},op=qr("completion/complete",Du),ip=qr("server/discover",{}),sa=de({toolsListChanged:et().optional(),promptsListChanged:et().optional(),resourcesListChanged:et().optional(),resourceSubscriptions:Ce(ne()).optional()}),$u={notifications:sa},sp=qr("subscriptions/listen",$u),ap=ra.extend({"io.modelcontextprotocol/subscriptionId":R}),Uu=xt({_meta:ap,resultType:na.default("complete")}),zi={"tools/call":jr("tools/call",Lu),"tools/list":jr("tools/list",To),"prompts/get":jr("prompts/get",{name:ne(),arguments:je(ne(),ne()).optional()}),"prompts/list":jr("prompts/list",To),"resources/list":jr("resources/list",To),"resources/templates/list":jr("resources/templates/list",To),"resources/read":jr("resources/read",{uri:ne()}),"completion/complete":jr("completion/complete",Du),"server/discover":jr("server/discover",{}),"subscriptions/listen":jr("subscriptions/listen",$u)};function Or(jn){return xt({_meta:oa,...jn})}let up={"tools/call":Or({content:Ce(Tn),structuredContent:gt().optional(),isError:et().optional()}),"tools/list":Or({ttlMs:Me().int().min(0),cacheScope:Ot(["public","private"]),tools:Ce(qn),nextCursor:T.optional()}),"prompts/get":Or({description:ne().optional(),messages:Ce(_n)}),"prompts/list":Or({ttlMs:Me().int().min(0),cacheScope:Ot(["public","private"]),prompts:Ce(tn),nextCursor:T.optional()}),"resources/list":Or({ttlMs:Me().int().min(0),cacheScope:Ot(["public","private"]),resources:Ce(jt),nextCursor:T.optional()}),"resources/templates/list":Or({ttlMs:Me().int().min(0),cacheScope:Ot(["public","private"]),resourceTemplates:Ce(Ut),nextCursor:T.optional()}),"resources/read":Or({ttlMs:Me().int().min(0),cacheScope:Ot(["public","private"]),contents:Ce(Ke([We,At]))}),"completion/complete":Or({completion:de({values:Ce(ne()).max(100),total:Me().int().optional(),hasMore:et().optional()}).loose()}),"server/discover":Or({ttlMs:Me().int().min(0).catch(0),cacheScope:Ot(["public","private"]).catch("private"),supportedVersions:Ce(ne()),capabilities:oi,instructions:ne().optional()}),"subscriptions/listen":Or({})},fs=xt({"io.modelcontextprotocol/subscriptionId":R.optional()}),aa=de({method:pe("notifications/subscriptions/acknowledged"),params:de({_meta:fs.optional(),notifications:sa})}),ua=de({_meta:fs.optional(),requestId:R,reason:ne().optional()}),ca=de({method:pe("notifications/cancelled"),params:ua}),ph={"notifications/cancelled":ca,"notifications/progress":Rt,"notifications/message":mt,"notifications/resources/updated":qt,"notifications/resources/list_changed":ye,"notifications/tools/list_changed":yn,"notifications/prompts/list_changed":nn,"notifications/subscriptions/acknowledged":aa},vr=(jn)=>de({jsonrpc:pe("2.0"),id:Ke([ne(),Me().int()]),result:jn}).strict();return{JSONValueSchema:g,JSONObjectSchema:_,ProgressTokenSchema:E,CursorSchema:T,RequestIdSchema:R,RoleSchema:w,LoggingLevelSchema:B,TaskMetadataSchema:K,RelatedTaskMetadataSchema:X,RequestMetaSchema:ee,BaseRequestParamsSchema:re,TaskAugmentedRequestParamsSchema:ie,NotificationsParamsSchema:se,NotificationSchema:ae,IconSchema:fe,IconsSchema:xe,BaseMetadataSchema:Ee,ImplementationSchema:Ae,ClientTasksCapabilitySchema:Ge,ServerTasksCapabilitySchema:ke,ClientCapabilitiesSchema:qe,ServerCapabilitiesSchema:pt,ProgressSchema:ht,ProgressNotificationParamsSchema:Oe,ProgressNotificationSchema:Rt,LoggingMessageNotificationParamsSchema:Nt,LoggingMessageNotificationSchema:mt,ResourceContentsSchema:_t,TextResourceContentsSchema:We,BlobResourceContentsSchema:At,AnnotationsSchema:Et,ResourceSchema:jt,ResourceTemplateSchema:Ut,ResourceListChangedNotificationSchema:ye,ResourceUpdatedNotificationParamsSchema:on,ResourceUpdatedNotificationSchema:qt,PromptArgumentSchema:ve,PromptSchema:tn,PromptListChangedNotificationSchema:nn,TextContentSchema:$t,ImageContentSchema:Kt,AudioContentSchema:Wt,ToolUseContentSchema:bn,EmbeddedResourceSchema:cn,ResourceLinkSchema:un,ContentBlockSchema:Tn,PromptMessageSchema:_n,ToolAnnotationsSchema:sn,ToolListChangedNotificationSchema:yn,ModelHintSchema:Br,ModelPreferencesSchema:_o,ToolChoiceSchema:Ci,BooleanSchemaSchema:is,StringSchemaSchema:wi,NumberSchemaSchema:Ai,UntitledSingleSelectEnumSchemaSchema:ss,TitledSingleSelectEnumSchemaSchema:as,LegacyTitledEnumSchemaSchema:us,SingleSelectEnumSchemaSchema:cs,UntitledMultiSelectEnumSchemaSchema:ls,TitledMultiSelectEnumSchemaSchema:Ue,MultiSelectEnumSchemaSchema:ft,EnumSchemaSchema:Gt,PrimitiveSchemaDefinitionSchema:Qt,ElicitRequestFormParamsSchema:$n,ResourceTemplateReferenceSchema:Sn,PromptReferenceSchema:Un,RootSchema:dr,ClientCapabilities2026Schema:Eo,ServerCapabilities2026Schema:oi,RequestMetaEnvelopeSchema:Uo,ToolSchema:qn,ToolResultContentSchema:eo,SamplingMessageContentBlockSchema:pr,SamplingMessageSchema:ds,ResultTypeSchema:na,ResultMetaSchema:ra,ResultSchema:hu,PaginatedResultSchema:Gd,CallToolResultSchema:ia,ListToolsResultSchema:gu,ListPromptsResultSchema:bu,GetPromptResultSchema:Su,ListResourcesResultSchema:_u,ListResourceTemplatesResultSchema:Eu,ReadResourceResultSchema:Tu,CompleteResultSchema:yu,CacheableResultSchema:Yd,DiscoverResultSchema:vu,CreateMessageRequestParamsSchema:Pi,CreateMessageRequestSchema:xu,ListRootsRequestSchema:Ru,CreateMessageResultSchema:ku,ListRootsResultSchema:Iu,ElicitResultSchema:Cu,ElicitRequestURLParamsSchema:wu,ElicitRequestParamsSchema:Au,ElicitRequestSchema:Pu,InputRequestSchema:zu,InputResponseSchema:Nu,InputRequestsSchema:Ou,InputResponsesSchema:Mu,InputRequiredResultSchema:ps,InputResponseRequestParamsSchema:Wd,CallToolRequestSchema:Jd,ListToolsRequestSchema:Xd,ListPromptsRequestSchema:Qd,GetPromptRequestSchema:ep,ListResourcesRequestSchema:tp,ListResourceTemplatesRequestSchema:np,ReadResourceRequestSchema:rp,CompleteRequestSchema:op,DiscoverRequestSchema:ip,SubscriptionFilterSchema:sa,SubscriptionsListenRequestSchema:sp,SubscriptionsListenResultMetaSchema:ap,SubscriptionsListenResultSchema:Uu,dispatchRequestSchemas:zi,dispatchResultSchemas:up,NotificationMetaSchema:fs,SubscriptionsAcknowledgedNotificationSchema:aa,CancelledNotificationParamsSchema:ua,CancelledNotificationSchema:ca,notificationSchemas2026:ph,JSONRPCResultResponseSchema:vr(hu),CallToolResultResponseSchema:vr(Ke([ia,ps])),ListToolsResultResponseSchema:vr(gu),ListPromptsResultResponseSchema:vr(bu),GetPromptResultResponseSchema:vr(Ke([Su,ps])),ListResourcesResultResponseSchema:vr(_u),ListResourceTemplatesResultResponseSchema:vr(Eu),ReadResourceResultResponseSchema:vr(Ke([Tu,ps])),CompleteResultResponseSchema:vr(yu),DiscoverResultResponseSchema:vr(vu),SubscriptionsListenResultResponseSchema:vr(Uu)}}var YN;function Vi(){return YN??=GN()}var WN=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];function KN(g){return WN.includes(g)}var p0=Symbol("modelcontextprotocol.resultCacheHintFallback");function JN(g){return g[p0]}function tR(g){return typeof g==="number"&&Number.isSafeInteger(g)&&g>=0}function nR(g){return g==="public"||g==="private"}var ln=function(g){return g[g.ParseError=-32700]="ParseError",g[g.InvalidRequest=-32600]="InvalidRequest",g[g.MethodNotFound=-32601]="MethodNotFound",g[g.InvalidParams=-32602]="InvalidParams",g[g.InternalError=-32603]="InternalError",g[g.ResourceNotFound=-32002]="ResourceNotFound",g[g.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",g[g.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",g[g.UrlElicitationRequired=-32042]="UrlElicitationRequired",g}({}),ar=class g extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](_){return Xr(this,_)}static isInstance(_){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Xr(this,_)}constructor(_,E,T){super(E);this.code=_,this.data=T,this.name="ProtocolError",Ms(this,new.target)}static fromError(_,E,T){if(_===ln.UrlElicitationRequired&&T){let R=T;if(R.elicitations)return new oR(R.elicitations,E)}if(_===ln.UnsupportedProtocolVersion&&T){let R=T;if(Array.isArray(R.supported)&&typeof R.requested==="string")return new iR({supported:R.supported,requested:R.requested},E)}if(_===ln.InvalidParams||_===ln.ResourceNotFound){let R=T;if(typeof R?.uri==="string"&&(_===ln.ResourceNotFound||Object.keys(R).length===1))return new rR(R.uri,E)}if(_===ln.MissingRequiredClientCapability&&T){let R=T;if(R.requiredCapabilities!==null&&typeof R.requiredCapabilities==="object"&&!Array.isArray(R.requiredCapabilities))return new sR({requiredCapabilities:R.requiredCapabilities},E)}return new g(_,E,T)}},rR=class extends ar{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(g,_=`Resource not found: ${g}`){super(ln.InvalidParams,_,{uri:g})}get uri(){return this.data.uri}},oR=class extends ar{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(g,_=`URL elicitation${g.length>1?"s":""} required`){super(ln.UrlElicitationRequired,_,{elicitations:g})}get elicitations(){return this.data?.elicitations??[]}},iR=class extends ar{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(g,_=`Unsupported protocol version: ${g.requested}`){super(ln.UnsupportedProtocolVersion,_,g)}get supported(){return this.data.supported}get requested(){return this.data.requested}},sR=class extends ar{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(g,_=`Missing required client capabilities: ${Object.keys(g.requiredCapabilities).join(", ")}`){super(ln.MissingRequiredClientCapability,_,g)}get requiredCapabilities(){return this.data.requiredCapabilities}},XN=0,QN="private",eO=["tools/call","prompts/get","resources/read"];function tO(g,_){let E=_.resultType;if(E===void 0)return{..._,resultType:"complete"};if(E==="complete")return _;if(eO.includes(g))return _;throw new ar(ln.InternalError,`Handler for ${g} returned resultType '${String(E)}', but results of ${g} only support 'complete' on protocol revision 2026-07-28`)}function nO(g,_){let E=JN(_);if(_.resultType!=="complete"||!KN(g))return E===void 0?_:aO(_);let T=_,R=tR(T.ttlMs)?T.ttlMs:iO(E),w=nR(T.cacheScope)?T.cacheScope:sO(E),B={...T,ttlMs:R,cacheScope:w};return delete B[p0],B}function rO(g){return g!==null&&typeof g==="object"&&!Array.isArray(g)}function oO(g,_){if(_===void 0)return g;let E=g._meta;if(E===void 0)return{...g,_meta:{[Bi]:_}};if(!rO(E))return g;if(E[Bi]!==void 0)return g;return{...g,_meta:{...E,[Bi]:_}}}function iO(g){return g!==void 0&&tR(g.ttlMs)?g.ttlMs:XN}function sO(g){return g!==void 0&&nR(g.cacheScope)?g.cacheScope:QN}function aO(g){let _={...g};return delete _[p0],_}var uO=["elicitation/create","sampling/createMessage","roots/list"],zm;function aR(){if(zm)return zm;let g=Vi();return zm={request:{"elicitation/create":de({method:pe("elicitation/create"),params:g.ElicitRequestParamsSchema}),"sampling/createMessage":de({method:pe("sampling/createMessage"),params:g.CreateMessageRequestParamsSchema}),"roots/list":de({method:pe("roots/list"),params:xt({}).optional()})},response:{"elicitation/create":g.ElicitResultSchema,"sampling/createMessage":g.CreateMessageResultSchema,"roots/list":g.ListRootsResultSchema}},zm}function uR(g){return uO.includes(g)}function Qg(g){return uR(g)?aR().request[g]:void 0}function cO(g){return uR(g)?aR().response[g]:void 0}var m0={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},cR={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function lR(g){return Object.prototype.hasOwnProperty.call(m0,g)}function dR(g){return Object.prototype.hasOwnProperty.call(cR,g)}function lO(g){return Object.prototype.hasOwnProperty.call(m0,g)}function dO(g){return lR(g)?Vi().dispatchRequestSchemas[g]:void 0}function pO(g){return lO(g)?Vi().dispatchResultSchemas[g]:void 0}function mO(g){return dR(g)?Vi().notificationSchemas2026[g]:void 0}var QV=Object.keys(m0),eG=Object.keys(cR);function Wl(g){return g!==null&&typeof g==="object"&&!Array.isArray(g)}function Gl(g,_){if(g===void 0)return{ok:!1,reason:"not-in-era"};let E=g.safeParse(_);return E.success?{ok:!0,value:E.data}:{ok:!1,reason:"invalid",message:String(E.error)}}var fO={ok:!1,reason:"not-in-era"},hO=[_s,Es];function gO(g,_){let E=_,T=!1,R=()=>{if(!T)E={...E},T=!0;return E},w=_.tools;if(g==="tools/list"&&Array.isArray(w)&&w.some((Z)=>Wl(Z)&&("execution"in Z)))R().tools=w.map((Z)=>{if(!Wl(Z)||!("execution"in Z))return Z;let K={...Z};return delete K.execution,K});let B=_.capabilities;if(Wl(B)&&"tasks"in B){let Z={...B};delete Z.tasks,R().capabilities=Z}return E}var f0={era:"2026-07-28",hasRequestMethod:lR,hasNotificationMethod:dR,hasInputRequestMethod:(g)=>Qg(g)!==void 0,validateRequest:(g,_)=>Gl(dO(g),_),validateResult:(g,_)=>Gl(pO(g),_),validateNotification:(g,_)=>Gl(mO(g),_),validateInputRequest:(g,_)=>Gl(Qg(g),_),validateInputResponse:(g,_)=>Gl(cO(g),_),samplingResultVariant:()=>fO,outboundEnvelope(g){return{[_s]:g.protocolVersion,[ba]:g.clientInfo,[Es]:g.clientCapabilities,...g.logLevel!==void 0&&{[Sa]:g.logLevel}}},validateEnvelopeMeta(g){let _=[];for(let T of hO)if(!(T in g))_.push({key:T,problem:"missing"});let E=Vi().RequestMetaEnvelopeSchema.safeParse(g);if(!E.success)for(let T of E.error.issues){let R=T.path.map(String),w=R.length>0?R.join("."):"_meta";if(R.length===1&&_.some((B)=>B.key===w&&B.problem==="missing"))continue;_.push({key:w,problem:T.message})}return _},projectCallToolResult:(g)=>Gx(g),inputRequestSchema:Qg,decodeResult(g,_){if(!Wl(_))return{kind:"invalid",error:new Zn(sr.InvalidResult,`Invalid result for ${g}: not an object`,{method:g})};let E=_.resultType;if(E===void 0)return{kind:"invalid",error:new Zn(sr.InvalidResult,`Invalid result for ${g}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:g,violation:"missing-resultType"})};if(typeof E!=="string")return{kind:"invalid",error:new Zn(sr.InvalidResult,`Invalid result for ${g}: non-string resultType`,{method:g,resultType:E})};if(E==="input_required"){let B=_.inputRequests,Z=Wl(B)?B:{},K=_.requestState,X=_._meta===void 0?void 0:Vi().ResultMetaSchema.safeParse(_._meta),ee=X?.success?X.data:void 0;if(Object.keys(Z).length===0&&typeof K!=="string")return{kind:"invalid",error:new Zn(sr.InvalidResult,`Invalid result for ${g}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:g,violation:"input-required-missing-both"})};return{kind:"input_required",inputRequests:Z,...typeof K==="string"&&{requestState:K},...ee!==void 0&&{_meta:ee}}}if(E!=="complete")return{kind:"invalid",error:new Zn(sr.UnsupportedResultType,`Unsupported result type '${E}' for ${g}`,{resultType:E,method:g})};let T=bO(),R=Object.hasOwn(T,g)?T[g]:void 0;if(R!==void 0){let B=R.safeParse(_);if(!B.success)return{kind:"invalid",error:new Zn(sr.InvalidResult,`Invalid result for ${g}: ${B.error}`,{method:g})}}let w={..._};return delete w.resultType,{kind:"complete",result:w}},encodeResult(g,_,E){return oO(nO(g,tO(g,gO(g,_))),E)},encodeErrorCode:(g)=>g===-32002?-32602:g,checkInboundEnvelope(g){if(g.envelope===void 0)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let _=Vi().RequestMetaEnvelopeSchema.safeParse(g.envelope);if(!_.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${_.error.issues.map((E)=>E.message).join("; ")}`}},Nm;function bO(){if(Nm)return Nm;let g=Vi();return Nm={"tools/call":g.CallToolResultSchema,"tools/list":g.ListToolsResultSchema,"prompts/get":g.GetPromptResultSchema,"prompts/list":g.ListPromptsResultSchema,"resources/list":g.ListResourcesResultSchema,"resources/templates/list":g.ListResourceTemplatesResultSchema,"resources/read":g.ReadResourceResultSchema,"completion/complete":g.CompleteResultSchema,"server/discover":g.DiscoverResultSchema},Nm}var h0="2026-07-28";function Jl(g){return g!==void 0&&Vx(g)?f0:d0}function Ux(g){if(g.revision!==void 0)return Jl(g.revision).era;return g.era==="modern"?f0.era:d0.era}function e0(g){return pR.some((_)=>_.hasRequestMethod(g))}function t0(g){return pR.some((_)=>_.hasNotificationMethod(g))}function Fx(g){return g==="tasks/get"||g==="tasks/cancel"}var pR=[d0,f0],SO=yx({AnnotationsSchema:()=>Wo,AudioContentSchema:()=>Cs,BaseMetadataSchema:()=>Vo,BaseRequestParamsSchema:()=>Qn,BlobResourceContentsSchema:()=>za,BooleanSchemaSchema:()=>La,CallToolRequestParamsSchema:()=>nl,CallToolRequestSchema:()=>rl,CallToolResultSchema:()=>Zi,CancelTaskRequestSchema:()=>Em,CancelTaskResultSchema:()=>Tm,CancelledNotificationParamsSchema:()=>lc,CancelledNotificationSchema:()=>Ra,ClientCapabilitiesSchema:()=>pc,ClientNotificationSchema:()=>vm,ClientRequestSchema:()=>ym,ClientResultSchema:()=>xm,ClientTasksCapabilitySchema:()=>am,CompatibilityCallToolResultSchema:()=>cm,CompleteRequestParamsSchema:()=>wl,CompleteRequestSchema:()=>Al,CompleteResultSchema:()=>Pl,ContentBlockSchema:()=>Ko,CreateMessageRequestParamsSchema:()=>fl,CreateMessageRequestSchema:()=>hl,CreateMessageResultSchema:()=>gl,CreateMessageResultWithToolsSchema:()=>bl,CreateTaskResultSchema:()=>pm,CursorSchema:()=>Ea,DiscoverRequestSchema:()=>bc,DiscoverResultSchema:()=>Ia,ElicitRequestFormParamsSchema:()=>Os,ElicitRequestParamsSchema:()=>yl,ElicitRequestSchema:()=>vl,ElicitRequestURLParamsSchema:()=>Tl,ElicitResultSchema:()=>kl,ElicitationCompleteNotificationParamsSchema:()=>xl,ElicitationCompleteNotificationSchema:()=>Rl,EmbeddedResourceSchema:()=>ws,EmptyResultSchema:()=>qi,EnumSchemaSchema:()=>El,GetPromptRequestParamsSchema:()=>Vc,GetPromptRequestSchema:()=>Gc,GetPromptResultSchema:()=>Kc,GetTaskPayloadRequestSchema:()=>gm,GetTaskPayloadResultSchema:()=>bm,GetTaskRequestSchema:()=>fm,GetTaskResultSchema:()=>hm,IconSchema:()=>dc,IconsSchema:()=>di,ImageContentSchema:()=>Is,ImplementationSchema:()=>Yo,InitializeRequestParamsSchema:()=>mc,InitializeRequestSchema:()=>fc,InitializeResultSchema:()=>hc,InitializedNotificationSchema:()=>gc,JSONArraySchema:()=>im,JSONObjectSchema:()=>Mn,JSONRPCErrorResponseSchema:()=>vs,JSONRPCMessageSchema:()=>xs,JSONRPCNotificationSchema:()=>xa,JSONRPCRequestSchema:()=>va,JSONRPCResponseSchema:()=>sm,JSONRPCResultResponseSchema:()=>ys,JSONValueSchema:()=>li,LegacyTitledEnumSchemaSchema:()=>Ua,ListChangedOptionsBaseSchema:()=>lm,ListPromptsRequestSchema:()=>jc,ListPromptsResultSchema:()=>Zc,ListResourceTemplatesRequestSchema:()=>xc,ListResourceTemplatesResultSchema:()=>Rc,ListResourcesRequestSchema:()=>yc,ListResourcesResultSchema:()=>vc,ListRootsRequestSchema:()=>Nl,ListRootsResultSchema:()=>Ol,ListTasksRequestSchema:()=>Sm,ListTasksResultSchema:()=>_m,ListToolsRequestSchema:()=>el,ListToolsResultSchema:()=>tl,LoggingLevelSchema:()=>Ma,LoggingMessageNotificationParamsSchema:()=>al,LoggingMessageNotificationSchema:()=>Ps,ModelHintSchema:()=>ul,ModelPreferencesSchema:()=>cl,MultiSelectEnumSchemaSchema:()=>_l,NotificationSchema:()=>or,NotificationsParamsSchema:()=>gr,NumberSchemaSchema:()=>Ns,PaginatedRequestParamsSchema:()=>Ec,PaginatedRequestSchema:()=>pi,PaginatedResultSchema:()=>mi,PingRequestSchema:()=>Ca,PrimitiveSchemaDefinitionSchema:()=>Ha,ProgressNotificationParamsSchema:()=>_c,ProgressNotificationSchema:()=>wa,ProgressSchema:()=>Sc,ProgressTokenSchema:()=>_a,PromptArgumentSchema:()=>Hc,PromptListChangedNotificationSchema:()=>Jc,PromptMessageSchema:()=>Wc,PromptReferenceSchema:()=>Cl,PromptSchema:()=>qc,ReadResourceRequestParamsSchema:()=>kc,ReadResourceRequestSchema:()=>Ic,ReadResourceResultSchema:()=>Cc,RelatedTaskMetadataSchema:()=>cc,RequestIdSchema:()=>vo,RequestMetaSchema:()=>Ta,RequestSchema:()=>Ln,ResourceContentsSchema:()=>Aa,ResourceLinkSchema:()=>As,ResourceListChangedNotificationSchema:()=>wc,ResourceRequestParamsSchema:()=>Rs,ResourceSchema:()=>Na,ResourceTemplateReferenceSchema:()=>Il,ResourceTemplateSchema:()=>Tc,ResourceUpdatedNotificationParamsSchema:()=>Fc,ResourceUpdatedNotificationSchema:()=>Bc,ResultMetaObjectSchema:()=>ya,ResultSchema:()=>Dn,RoleSchema:()=>fi,RootSchema:()=>zl,RootsListChangedNotificationSchema:()=>Ml,SamplingContentSchema:()=>pl,SamplingMessageContentBlockSchema:()=>Fi,SamplingMessageSchema:()=>ml,ServerCapabilitiesSchema:()=>ka,ServerNotificationSchema:()=>km,ServerRequestSchema:()=>Rm,ServerResultSchema:()=>Im,ServerTasksCapabilitySchema:()=>um,SetLevelRequestParamsSchema:()=>il,SetLevelRequestSchema:()=>sl,SingleSelectEnumSchemaSchema:()=>Sl,StringSchemaSchema:()=>zs,SubscribeRequestParamsSchema:()=>Ac,SubscribeRequestSchema:()=>Pc,SubscriptionFilterSchema:()=>Oa,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Lc,SubscriptionsAcknowledgedNotificationSchema:()=>Dc,SubscriptionsListenRequestParamsSchema:()=>Oc,SubscriptionsListenRequestSchema:()=>Mc,SubscriptionsListenResultMetaSchema:()=>$c,SubscriptionsListenResultSchema:()=>Uc,TaskAugmentedRequestParamsSchema:()=>Hi,TaskCreationParamsSchema:()=>dm,TaskMetadataSchema:()=>uc,TaskSchema:()=>hi,TaskStatusNotificationParamsSchema:()=>Dl,TaskStatusNotificationSchema:()=>mm,TaskStatusSchema:()=>Ll,TextContentSchema:()=>ks,TextResourceContentsSchema:()=>Pa,TitledMultiSelectEnumSchemaSchema:()=>Ba,TitledSingleSelectEnumSchemaSchema:()=>$a,ToolAnnotationsSchema:()=>Xc,ToolChoiceSchema:()=>ll,ToolExecutionSchema:()=>Qc,ToolListChangedNotificationSchema:()=>ol,ToolResultContentSchema:()=>dl,ToolSchema:()=>ji,ToolUseContentSchema:()=>Yc,UnsubscribeRequestParamsSchema:()=>zc,UnsubscribeRequestSchema:()=>Nc,UntitledMultiSelectEnumSchemaSchema:()=>Fa,UntitledSingleSelectEnumSchemaSchema:()=>Da});var mR=(g)=>va.safeParse(g).success,fR=(g)=>xa.safeParse(g).success,s0=(g)=>ys.safeParse(g).success,hR=(g)=>vs.safeParse(g).success;var Kl=-32020,tG=[{rung:"http-method",order:1,evaluatedAt:"edge",codes:[-32000],conformance:[],rationale:"The modern era is POST-only; GET/DELETE are body-less 2025-era session operations and are method-routed to legacy serving (405 when legacy serving is not configured), before any body is read."},{rung:"jsonrpc-shape",order:2,evaluatedAt:"edge",codes:[ln.InvalidRequest],conformance:["server-stateless"],rationale:"The body must be a JSON-RPC request or notification: posted responses and batch arrays containing a modern or invalid element are rejected before classification (element-wise batch rule); all-legacy arrays stay legacy traffic."},{rung:"era-classification",order:3,evaluatedAt:"edge",codes:[Kl,ln.UnsupportedProtocolVersion],conformance:["server-stateless","http-header-validation","http-custom-header-server-validation"],rationale:"Body-primary era classification with the protocol-version header as a cross-check; a header/body disagreement is rejected with -32020 (HeaderMismatch), and an envelope-less request on a modern-only endpoint is answered with the unsupported-protocol-version error naming the supported revisions."},{rung:"envelope",order:4,evaluatedAt:"edge",codes:[ln.InvalidParams],conformance:["server-stateless"],rationale:"A present envelope claim with a malformed envelope — and a missing envelope on a request whose protocol-version header names a modern revision — is an invalid-params rejection naming the offending or missing key(s); never a silent fall back to legacy handling. This is the only place an invalid-params rejection maps to HTTP 400."},{rung:"method-registry",order:5,evaluatedAt:"dispatch",codes:[ln.MethodNotFound],conformance:["server-stateless"],rationale:"Method existence outranks parameter validity: a method absent from the negotiated revision’s registry (or with no handler installed) answers method-not-found before params or capabilities are looked at."},{rung:"request-params",order:6,evaluatedAt:"dispatch",codes:[ln.InvalidParams],conformance:[],rationale:"Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table."},{rung:"standard-header-validation",order:7,evaluatedAt:"pre-dispatch",codes:[Kl],conformance:["http-header-validation"],rationale:"SEP-2243 standard `MCP-Protocol-Version` / `Mcp-Method` / `Mcp-Name` headers — presence, sentinel decoding, and `Mcp-Name` ↔ body cross-check — are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before dispatch. The spec requires `MCP-Protocol-Version` and `Mcp-Method` on every modern *request* POST (`Mcp-Name` only for the methods that mirror `params.name` / `params.uri` / `params.taskId`, see `MCP_NAME_HEADER_SOURCE`) and names them in that order, so a request missing several is answered by the earliest. Notification POSTs are exempt: the presence half runs on requests only, so a modern-enveloped notification is dispatched even with no standard headers at all. The classifier’s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge `era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half — including the missing `MCP-Protocol-Version` cell, which cannot live on the edge rung without breaking body-primary classification. Evaluated before the capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by the standard-header rung first. The documented order (after method-registry 5 and request-params 6) is NOT the observed precedence: serveModern evaluates this rung immediately after the supported-revision gate, so a request that also fails a dispatch rung is answered here before the dispatch rungs (5–6) are consulted."},{rung:"client-capabilities",order:8,evaluatedAt:"pre-dispatch",codes:[ln.MissingRequiredClientCapability],conformance:["server-stateless"],rationale:"The capability requirement is checked by the HTTP entry, pre-dispatch, against the validated envelope the classifier produced — pinning the spec-mandated HTTP 400 independently of how dispatch- and handler-produced errors are mapped. The documented order (after method resolution and params validation) is preserved observably only while the requirement table is empty: once a served method gains a requirement entry, a request that is missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must consult the method registry before the gate if the documented precedence is to stay observable."},{rung:"param-header-validation",order:9,evaluatedAt:"pre-dispatch",codes:[Kl],conformance:["http-custom-header-server-validation"],rationale:"SEP-2243 `Mcp-Param-*` headers are validated against the named tool’s `x-mcp-header` declarations and the body `arguments` after the tool registry is known and before dispatch reaches the handler; a missing/disagreeing/malformed header is rejected 400 / -32020 with the same shape as the standard-header cross-checks. The documented order (after method resolution and params validation) is preserved observably only when the body `arguments` would otherwise validate: the check runs pre-dispatch, so a `tools/call` that fails BOTH this rung and a dispatch-time rung (e.g. order-6 `request-params`, -32602) is answered by this gate first with 400 / -32020, not by the earlier-ordered rung."}],nG={[ln.ParseError]:400,[ln.InvalidRequest]:400,[ln.MethodNotFound]:404,[ln.UnsupportedProtocolVersion]:400,[ln.MissingRequiredClientCapability]:400,[Kl]:400};function g0(g,_){return Gp(g,_)}function Yl(g){return new Set(g.flatMap((_)=>Object.keys(_.shape)))}function a0(g){if(g==null)return!1;let _=typeof g;if(_!=="object"&&_!=="function")return!1;if(!("~standard"in g))return!1;return typeof g["~standard"]?.validate==="function"}var Bx=!1,u0="draft-2020-12";function _O(g,_="input"){let E=g["~standard"],T;if(E.jsonSchema)T=E.jsonSchema[_]({target:u0});else if(E.vendor==="zod"){if(!("_zod"in g))throw Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");if(!Bx)Bx=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.");T=Zp(g,{target:u0,io:_})}else throw Error(`Schema library "${E.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(_==="output"){if(T.type!==void 0)return T;return gR(T)?{type:"object",...T}:T}if(T.type!==void 0&&T.type!=="object")throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(T.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...T}}function gR(g){if("properties"in g||"patternProperties"in g||"additionalProperties"in g||"required"in g)return!0;for(let _ of["oneOf","anyOf","allOf"]){let E=g[_];if(Array.isArray(E)&&E.length>0)return E.every((T)=>T!==null&&typeof T==="object"&&(T.type==="object"||gR(T)))}return!1}function EO(g){if(!g.path?.length)return g.message;return`${g.path.map((_)=>String(typeof _==="object"?_.key:_)).join(".")}: ${g.message}`}async function n0(g,_){let E=await g["~standard"].validate(_);if(E.issues&&E.issues.length>0)return{success:!1,error:E.issues.map((T)=>EO(T)).join(", ")};return{success:!0,data:E.value}}function TO(g){let _=Zp(g,{target:u0,io:"input"});return typeof _.pattern==="string"?_.pattern:void 0}var yO=/\\\.\\d\{(\d+)\}/;function vO(g){let _=yO.exec(g),E=[void 0,-1,0];if(_)E.push(Number(_[1]));return[!1,!0].flatMap((T)=>[!1,!0].flatMap((R)=>E.map((w)=>sc({local:T,offset:R,precision:w}))))}function xO(g,_){let E;switch(g){case"email":E=[Dv()];break;case"uri":E=[Kp()];break;case"date":E=[pN()];break;case"date-time":E=vO(_);break}return new Set(E.map((T)=>TO(T)).filter((T)=>T!==void 0))}function RO(g,_,E){if(E!=="zod")return!0;return xO(g,_).has(_)}function Xl(g){return typeof g==="object"&&g!==null&&!Array.isArray(g)}function kO(g){try{return _O(g,"input")}catch(_){let E=_ instanceof Error?_.message:String(_);throw new ar(ln.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${E}`)}}var IO=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function b0(g){return IO.has(g)||g.startsWith("x-")}var CO=new Set(["$schema",...Object.keys(Os.shape.requestedSchema.shape)]),Hx={string:Yl([zs,Da,$a,Ua]),number:Yl([Ns]),integer:Yl([Ns]),boolean:Yl([La]),array:Yl([Fa,Ba])},wO=new Set(zs.shape.format.unwrap().options);function AO(g,_,E,T){if(!Xl(g))return g;let R=typeof g.type==="string"&&Object.hasOwn(Hx,g.type)?Hx[g.type]:void 0;if(R===void 0)return g;let w={};for(let[B,Z]of Object.entries(g))if(R.has(B)||b0(B))w[B]=Z;else if(B==="pattern"&&g.type==="string"&&typeof g.format==="string"){if(!wO.has(g.format))w[B]=Z;else if(typeof Z!=="string"||!RO(g.format,Z,E))T.push(`${_}.${B}`)}else T.push(`${_}.${B}`);return w}function PO(g,_){let E={},T=[];for(let[R,w]of Object.entries(g))if(R==="properties"&&Xl(w))E[R]=Object.fromEntries(Object.entries(w).map(([B,Z])=>[B,AO(Z,`properties.${B}`,_,T)]));else if(CO.has(R))E[R]=w;else if(!b0(R))T.push(R);if(T.length>0)throw new ar(ln.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${T.join(", ")}`);return E}function zO(g,_){if(!Xl(g.properties))return _;let E=Object.entries(g.properties).filter(([,T])=>!g0(Ha,T).success).map(([T])=>`properties.${T}`);return E.length>0?E.join(", "):_}function c0(g,_,E=""){if(Array.isArray(g)&&Array.isArray(_))return g.flatMap((T,R)=>c0(T,_[R],`${E}[${R}]`));if(!Xl(g)||!Xl(_))return[];return Object.entries(g).flatMap(([T,R])=>{let w=E?`${E}.${T}`:T;if(!Object.prototype.hasOwnProperty.call(_,T))return b0(T)?[]:[w];return c0(R,_[T],w)})}function NO(g){if(!a0(g.requestedSchema))return{...g,mode:"form",requestedSchema:g.requestedSchema};let _=g.requestedSchema["~standard"].vendor,E=PO(kO(g.requestedSchema),_),T=g0(Os.shape.requestedSchema,E);if(!T.success)throw new ar(ln.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${zO(E,T.error.message)}`);let R=c0(E,T.data);if(R.length>0)throw new ar(ln.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${R.join(", ")}`);let w=(T.data.required??[]).filter((B)=>!Object.prototype.hasOwnProperty.call(T.data.properties,B));if(w.length>0)throw new ar(ln.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${w.join(", ")}`);return{...g,mode:"form",requestedSchema:T.data}}function OO(g){let _=g.inputRequests!==void 0&&Object.keys(g.inputRequests).length>0,E=typeof g.requestState==="string";if(!_&&!E)throw TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...g.inputRequests!==void 0&&{inputRequests:g.inputRequests},...g.requestState!==void 0&&{requestState:g.requestState}}}var rG=Object.assign(OO,{elicit(g){try{return{method:"elicitation/create",params:NO(g)}}catch(_){throw _ instanceof ar?TypeError(_.message,{cause:_}):_}},elicitUrl(g){return{method:"elicitation/create",params:{...g,mode:"url"}}},createMessage(g){return{method:"sampling/createMessage",params:g}},listRoots(){return{method:"roots/list"}}});var MO=["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"],LO={IdJagTokenExchangeResponseSchema:Hl,OAuthClientInformationFullSchema:Vl,OAuthClientInformationSchema:Zl,OAuthClientMetadataSchema:jl,OAuthClientRegistrationErrorSchema:Cm,OAuthErrorResponseSchema:ql,OAuthMetadataSchema:qa,OAuthProtectedResourceMetadataSchema:$l,OAuthTokenRevocationRequestSchema:wm,OAuthTokensSchema:Bl,OpenIdProviderDiscoveryMetadataSchema:Fl,OpenIdProviderMetadataSchema:Ul},bR={},SR={};function _R(g,_){let E=g.slice(0,-6);bR[E]=_,SR[E]=(T)=>_.safeParse(T).success}for(let g of MO)_R(g,SO[g]);for(let[g,_]of Object.entries(LO))_R(g,_);var DO=Object.freeze(bR),$O=Object.freeze(SR);function UO(g){switch(g){case"initialize":case"notifications/initialized":return Jl(void 0);case"server/discover":return Jl(h0);default:return}}var ER=60000,FO=[_s,ba,Es,Sa],BO=["inputResponses","requestState"];function qx(g,_){let E=g.params;if(!r0(E))return{message:g,lifted:{}};let T=E._meta,R=r0(T)?FO.filter((K)=>(K in T)):[],w=_==="request"?BO.filter((K)=>(K in E)):[];if(R.length===0&&w.length===0)return{message:g,lifted:{}};let B={},Z={...E};if(R.length>0&&r0(T)){let K={},X={...T};for(let ee of R)K[ee]=T[ee],delete X[ee];if(B.envelope=K,Object.keys(X).length>0)Z._meta=X;else delete Z._meta}for(let K of w){if(K==="inputResponses")B.inputResponses=Z[K];if(K==="requestState")B.requestState=Z[K];delete Z[K]}return{message:{...g,params:Z},lifted:B}}function jx(g,_){let E=g.validateResult(_,void 0);if(!E.ok&&E.reason==="not-in-era")return;return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(T){let R=g.validateResult(_,T);if(R.ok)return{value:R.value};return{issues:[{message:R.reason==="invalid"?R.message:`not-in-era: ${_}`}]}}}}}function TR(g){return()=>g}var HO=TR(void 0),qO,S0=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;static{qO=(g,_)=>{g._negotiatedProtocolVersion=_}}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(g){this._options=g,this._supportedProtocolVersions=g?.supportedProtocolVersions??nm,this.setNotificationHandler("notifications/cancelled",(_)=>{this._oncancel(_)}),this.setNotificationHandler("notifications/progress",(_)=>{this._onprogress(_)}),this.setRequestHandler("ping",(_)=>({}))}_shouldDropInbound(g){}_outboundMetaEnvelope(){}_envelopeOutbound(g){let _=this._outboundMetaEnvelope();if(_===void 0)return g;let E=g.params??{};return{...g,params:{...E,_meta:{..._,...E._meta}}}}_resolveNonCompleteResult(g,_){return Promise.reject(new Zn(sr.UnsupportedResultType,`Unsupported result type '${g.kind}' for ${_.request.method}`,{resultType:g.kind,method:_.request.method}))}_getRequestHandler(g){return this._requestHandlers.get(g)}async _oncancel(g){if(g.params.requestId===void 0)return;this._requestHandlerAbortControllers.get(g.params.requestId)?.abort(g.params.reason)}_setupTimeout(g,_,E,T,R=!1){this._timeoutInfo.set(g,{timeoutId:setTimeout(T,_),startTime:Date.now(),timeout:_,maxTotalTimeout:E,resetTimeoutOnProgress:R,onTimeout:T})}_resetTimeout(g){let _=this._timeoutInfo.get(g);if(!_)return!1;let E=Date.now()-_.startTime;if(_.maxTotalTimeout&&E>=_.maxTotalTimeout)throw this._timeoutInfo.delete(g),new Zn(sr.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:_.maxTotalTimeout,totalElapsed:E});return clearTimeout(_.timeoutId),_.timeoutId=setTimeout(_.onTimeout,_.timeout),!0}_cleanupTimeout(g){let _=this._timeoutInfo.get(g);if(_)clearTimeout(_.timeoutId),this._timeoutInfo.delete(g)}async connect(g){this._transport=g;let _=this.transport?.onclose;this._transport.onclose=()=>{try{_?.()}finally{this._onclose()}};let E=this.transport?.onerror;this._transport.onerror=(R)=>{E?.(R),this._onerror(R)};let T=this._transport?.onmessage;this._transport.onmessage=(R,w)=>{if(T?.(R,w),s0(R)||hR(R))this._onresponse(R);else if(mR(R))this._onrequest(R,w);else if(fR(R))this._onnotification(R,w);else this._onerror(Error(`Unknown message type: ${JSON.stringify(R)}`))},g.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let g=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let T of this._timeoutInfo.values())clearTimeout(T.timeoutId);this._timeoutInfo.clear();let _=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let E=new Zn(sr.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let T of g.values())T(E);for(let T of _.values())T.abort(E)}}_onerror(g){this.onerror?.(g)}_onnotification(g,_){let{message:E}=qx(g,"notification"),T=this._negotiatedWireCodec();if(_?.classification===void 0&&this._shouldDropInbound(g)==="drop")return;if(_?.classification!==void 0){let B=Ux(_.classification);if(B!==T.era){this._onerror(Error(`Era mismatch on inbound notification '${E.method}': classified as ${B} but this instance serves ${T.era}`));return}}if(t0(E.method)&&!T.hasNotificationMethod(E.method))return;let R=this._notificationHandlers.get(E.method),w=this.fallbackNotificationHandler;if(R===void 0&&w===void 0)return;Promise.resolve().then(()=>R===void 0?w(E):R(E,T)).catch((B)=>this._onerror(Error(`Uncaught error in notification handler: ${B}`)))}_onrequest(g,_){let{message:E,lifted:T}=qx(g,"request"),R=this._negotiatedWireCodec();if(_?.classification===void 0&&this._shouldDropInbound(g)==="drop"){this._onerror(Error(`Dropped inbound request '${g.method}': not servable on this connection's protocol era`));return}let w=this._transport,B=(fe,xe,Ee)=>{let Ae={jsonrpc:"2.0",id:E.id,error:{code:fe,message:xe,...Ee!==void 0&&{data:Ee}}};w?.send(Ae).catch((Re)=>this._onerror(Error(`Failed to send an error response: ${Re}`)))};if(_?.classification!==void 0){let fe=Ux(_.classification);if(fe!==R.era){this._onerror(Error(`Era mismatch on inbound request '${E.method}': classified as ${fe} but this instance serves ${R.era}`));let xe=_.classification.revision??fe;B(ln.UnsupportedProtocolVersion,`Unsupported protocol version: ${xe}`,{supported:this._supportedProtocolVersions,requested:xe});return}}if(e0(E.method)&&!R.hasRequestMethod(E.method)&&!(Fx(E.method)&&this._customSchemaRequestMethods.has(E.method))){B(ln.MethodNotFound,"Method not found");return}let Z=this._requestHandlers.get(E.method)??this.fallbackRequestHandler;if(Z===void 0){B(ln.MethodNotFound,"Method not found");return}let K=R.checkInboundEnvelope(T);if(K!==void 0){B(ln.InvalidParams,K);return}let X=(fe,xe)=>this._notificationViaCodec(this._resolveOutboundCodec(fe.method),fe,{...xe,relatedRequestId:E.id}),ee=(fe,xe,Ee)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(fe.method),fe,xe,{...Ee,relatedRequestId:E.id}),re=new AbortController;this._requestHandlerAbortControllers.set(E.id,re);let ie=T.inputResponses===void 0?void 0:jO(T.inputResponses),se={sessionId:w?.sessionId,mcpReq:{id:E.id,method:E.method,_meta:E.params?._meta,...T.envelope!==void 0&&{envelope:T.envelope},...ie!==void 0&&{inputResponses:ie.accepted},...ie!==void 0&&ie.droppedKeys.length>0&&{droppedInputResponseKeys:ie.droppedKeys},requestState:T.requestState===void 0?HO:TR(T.requestState),signal:re.signal,send:(fe,xe,Ee)=>{let Ae=this._resolveOutboundCodec(fe.method);if(this._assertOutboundRequestInEra(Ae,fe.method),a0(xe))return ee(fe,xe,Ee);let Re=jx(Ae,fe.method);if(Re===void 0)throw TypeError(`'${fe.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return ee(fe,Re,xe)},notify:X},http:_?.authInfo?{authInfo:_.authInfo}:void 0},ae=this.buildContext(se,_);Promise.resolve().then(()=>Z(E,ae)).then(async(fe)=>{if(re.signal.aborted)return;let xe;try{xe=R.encodeResult(E.method,fe,this._outboundServerInfo())}catch(Ae){this._onerror(Error(`Failed to encode result for ${E.method}: ${Ae}`)),B(ln.InternalError,"Internal error");return}let Ee={result:xe,jsonrpc:"2.0",id:E.id};await w?.send(Ee)},async(fe)=>{if(re.signal.aborted)return;let xe=Number.isSafeInteger(fe.code)?fe.code:ln.InternalError,Ee={jsonrpc:"2.0",id:E.id,error:{code:R.encodeErrorCode(xe),message:fe.message??"Internal error",...fe.data!==void 0&&{data:fe.data}}};await w?.send(Ee)}).catch((fe)=>this._onerror(Error(`Failed to send response: ${fe}`))).finally(()=>{if(this._requestHandlerAbortControllers.get(E.id)===re)this._requestHandlerAbortControllers.delete(E.id)})}_onprogress(g){let{progressToken:_,...E}=g.params,T=Number(_),R=this._progressHandlers.get(T);if(!R){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(g)}`));return}let w=this._responseHandlers.get(T),B=this._timeoutInfo.get(T);if(B&&w&&B.resetTimeoutOnProgress)try{this._resetTimeout(T)}catch(Z){this._responseHandlers.delete(T),this._progressHandlers.delete(T),this._cleanupTimeout(T),w(Z);return}R(E)}_onresponse(g){let _=Number(g.id),E=this._responseHandlers.get(_);if(E===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(g)}`));return}if(this._responseHandlers.delete(_),this._cleanupTimeout(_),this._progressHandlers.delete(_),s0(g))E(g);else E(ar.fromError(g.error.code,g.error.message,g.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(g,_,E){let T=this._resolveOutboundCodec(g.method);if(a0(_)){if(!Fx(g.method))this._assertOutboundRequestInEra(T,g.method);return this._requestWithSchemaViaCodec(T,g,_,E)}this._assertOutboundRequestInEra(T,g.method);let R=jx(T,g.method);if(R===void 0)throw TypeError(`'${g.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(T,g,R,_)}_negotiatedWireCodec(){return Jl(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(g){if(this._negotiatedProtocolVersion===void 0){let _=UO(g);if(_)return _}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(g,_){if(e0(_)&&!g.hasRequestMethod(_))throw new Zn(sr.MethodNotSupportedByProtocolVersion,`Method '${_}' is not supported by the negotiated protocol version (wire era ${g.era})`,{method:_,era:g.era})}_requestWithSchema(g,_,E){let T=this._resolveOutboundCodec(g.method);return this._assertOutboundRequestInEra(T,g.method),this._requestWithSchemaViaCodec(T,g,_,E)}_requestWithSchemaViaCodec(g,_,E,T){let{relatedRequestId:R,resumptionToken:w,onresumptiontoken:B,headers:Z}=T??{},K=Date.now(),X,ee;return new Promise((re,ie)=>{let se=(ke)=>{ie(ke)};if(!this._transport){se(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(_.method)}catch(ke){se(ke);return}if(T?.signal?.aborted){let ke=T.signal.reason;throw ke instanceof Zn?ke:new Zn(sr.RequestTimeout,String(ke))}let ae=g.era===h0&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,fe=this._requestMessageId++;ee=fe;let xe={..._,jsonrpc:"2.0",id:fe};if(T?.onprogress)this._progressHandlers.set(fe,T.onprogress),xe.params={..._.params,_meta:{..._.params?._meta,progressToken:fe}};let Ee=this._envelopeOutbound(xe),Ae=!1,Re=(ke)=>{if(Ae)return;if(this._progressHandlers.delete(fe),ae===void 0){if(_.method!=="initialize")this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:fe,reason:String(ke)}}),{relatedRequestId:R,resumptionToken:w,onresumptiontoken:B}).catch((qe)=>this._onerror(Error(`Failed to send cancellation: ${qe}`)))}else ae.abort();ie(ke instanceof Zn?ke:new Zn(sr.RequestTimeout,String(ke)))};this._responseHandlers.set(fe,(ke)=>{if(T?.signal?.aborted)return;if(Ae=!0,ke instanceof Error)return ie(ke);let qe;try{qe=g.decodeResult(_.method,ke.result)}catch(ht){return ie(ht instanceof Error?ht:Error(String(ht)))}if(qe.kind==="invalid")return ie(qe.error);if(qe.kind==="input_required"){if(T?.allowInputRequired===!0)return re(ZO(qe));let ht={codec:g,request:_,resultSchema:E,options:T,flowStartedAt:K,retry:(Oe,Rt)=>this._requestWithSchemaViaCodec(g,Oe===void 0?{method:_.method}:{method:_.method,params:Oe},E,Rt)};return re(this._resolveNonCompleteResult(qe,ht))}let pt=qe.result;n0(E,pt).then((ht)=>{if(ht.success)re(ht.data);else ie(new Zn(sr.InvalidResult,`Invalid result for ${_.method}: ${ht.error}`))},ie)}),X=()=>Re(T?.signal?.reason),T?.signal?.addEventListener("abort",X,{once:!0});let Ve=T?.timeout??ER,Ge=()=>Re(new Zn(sr.RequestTimeout,"Request timed out",{timeout:Ve}));this._setupTimeout(fe,Ve,T?.maxTotalTimeout,Ge,T?.resetTimeoutOnProgress??!1),this._transport.send(Ee,{relatedRequestId:R,resumptionToken:w,onresumptiontoken:B,headers:Z,requestSignal:ae?.signal}).catch((ke)=>{this._progressHandlers.delete(fe),ie(ke)})}).finally(()=>{if(X)T?.signal?.removeEventListener("abort",X);if(ee!==void 0)this._responseHandlers.delete(ee),this._cleanupTimeout(ee)})}async notification(g,_){return await this._notificationViaCodec(this._resolveOutboundCodec(g.method),g,_)}async _notificationViaCodec(g,_,E){if(!this._transport)throw new Zn(sr.NotConnected,"Not connected");if(t0(_.method)&&!g.hasNotificationMethod(_.method))throw new Zn(sr.MethodNotSupportedByProtocolVersion,`Notification '${_.method}' is not supported by the negotiated protocol version (wire era ${g.era})`,{method:_.method,era:g.era});this.assertNotificationCapability(_.method);let T=this._envelopeOutbound({jsonrpc:"2.0",..._});if((this._options?.debouncedNotificationMethods??[]).includes(_.method)&&!_.params&&E?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(_.method))return;this._pendingDebouncedNotifications.add(_.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(_.method),!this._transport)return;this._transport?.send(T,E).catch((R)=>this._onerror(R))});return}await this._transport.send(T,E)}setRequestHandler(g,_,E){this.assertRequestHandlerCapability(g);let T;if(typeof _==="function"){if(!e0(g))throw TypeError(`'${g}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);T=(R,w)=>{let B=this._negotiatedWireCodec(),Z=B.validateRequest(g,R);if(!Z.ok&&Z.reason==="not-in-era")Z=B.validateInputRequest(g,R);if(!Z.ok){if(Z.reason==="not-in-era")throw new ar(ln.InternalError,`No wire schema for ${g} in the resolved era`);throw Error(Z.message)}return Promise.resolve(_(Z.value,w))}}else if(E)T=async(R,w)=>{let B=await n0(_.params,{...R.params});if(!B.success)throw new ar(ln.InvalidParams,`Invalid params for ${g}: ${B.error}`);return E(B.data,w)};else throw TypeError("setRequestHandler: handler is required");if(typeof _==="function")this._customSchemaRequestMethods.delete(g);else this._customSchemaRequestMethods.add(g);this._requestHandlers.set(g,this._wrapHandler(g,T))}_wrapHandler(g,_){return _}_outboundServerInfo(){}removeRequestHandler(g){this._requestHandlers.delete(g),this._customSchemaRequestMethods.delete(g)}assertCanSetRequestHandler(g){if(this._requestHandlers.has(g))throw Error(`A request handler for ${g} already exists, which would be overridden`)}setNotificationHandler(g,_,E){if(typeof _==="function"){if(!t0(g))throw TypeError(`'${g}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(g,(T,R)=>{let w=R.validateNotification(g,T);if(!w.ok){if(w.reason==="not-in-era")throw new ar(ln.InternalError,`No wire schema for ${g} in the resolved era`);throw Error(w.message)}return Promise.resolve(_(w.value))});return}if(!E)throw TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(g,async(T)=>{let R=await n0(_.params,{...T.params});if(!R.success)throw new ar(ln.InvalidParams,`Invalid params for notification ${g}: ${R.error}`);await E(R.data,T)})}removeNotificationHandler(g){this._notificationHandlers.delete(g)}};function r0(g){return g!==null&&typeof g==="object"&&!Array.isArray(g)}function Zx(g){return typeof g==="object"&&g!==null&&!Array.isArray(g)}function jO(g){let _={},E=[];if(!Zx(g))return{accepted:_,droppedKeys:E};for(let[T,R]of Object.entries(g)){if(!Zx(R)||"method"in R||"result"in R){E.push(T);continue}_[T]=R}return{accepted:_,droppedKeys:E}}function ZO(g){return{resultType:"input_required",inputRequests:g.inputRequests,...g.requestState!==void 0&&{requestState:g.requestState},...g._meta!==void 0&&{_meta:g._meta}}}/*!
|
|
59
|
+
* content-type
|
|
60
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
61
|
+
* MIT Licensed
|
|
62
|
+
*/var VO=Tx((g)=>{var _=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,E=/\\([\u000b\u0020-\u00ff])/g,T=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;g.parse=R;function R(Z){if(!Z)throw TypeError("argument string is required");var K=typeof Z==="object"?w(Z):Z;if(typeof K!=="string")throw TypeError("argument string is required to be a string");var X=K.indexOf(";"),ee=X!==-1?K.slice(0,X).trim():K.trim();if(!T.test(ee))throw TypeError("invalid media type");var re=new B(ee.toLowerCase());if(X!==-1){var ie,se,ae;_.lastIndex=X;while(se=_.exec(K)){if(se.index!==X)throw TypeError("invalid parameter format");if(X+=se[0].length,ie=se[1].toLowerCase(),ae=se[2],ae.charCodeAt(0)===34){if(ae=ae.slice(1,-1),ae.indexOf("\\")!==-1)ae=ae.replace(E,"$1")}re.parameters[ie]=ae}if(X!==K.length)throw TypeError("invalid parameter format")}return re}function w(Z){var K;if(typeof Z.getHeader==="function")K=Z.getHeader("content-type");else if(typeof Z.headers==="object")K=Z.headers&&Z.headers["content-type"];if(typeof K!=="string")throw TypeError("content-type header is missing from object");return K}function B(Z){this.parameters=Object.create(null),this.type=Z}}),oG=vx(VO(),1);var hG=typeof self<"u"&&self.location&&self.location.origin!=="null"?new URL(self.location.origin+self.location.pathname+location.search):new URL("https://github.com/cfworker");var GO=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,YO=[0,31,28,31,30,31,30,31,31,30,31,30,31],WO=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,KO=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,JO=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,XO=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,QO=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,e3=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,t3=/^(?:\/(?:[^~/]|~0|~1)*)*$/,n3=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,r3=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,o3=(g)=>{if(g[0]==='"')return!1;let[_,E,...T]=g.split("@");if(!_||!E||T.length!==0||_.length>64||E.length>253)return!1;if(_[0]==="."||_.endsWith(".")||_.includes(".."))return!1;if(!/^[a-z0-9.-]+$/i.test(E)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(_))return!1;return E.split(".").every((R)=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(R))},i3=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,s3=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,a3=(g)=>g.length>1&&g.length<80&&(/^P\d+([.,]\d+)?W$/.test(g)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(g)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(g));function Jo(g){return g.test.bind(g)}var gG={date:yR,time:vR.bind(void 0,!1),"date-time":l3,duration:a3,uri:m3,"uri-reference":Jo(JO),"uri-template":Jo(XO),url:Jo(QO),email:o3,hostname:Jo(KO),ipv4:Jo(i3),ipv6:Jo(s3),regex:h3,uuid:Jo(e3),"json-pointer":Jo(t3),"json-pointer-uri-fragment":Jo(n3),"relative-json-pointer":Jo(r3)};function u3(g){return g%4===0&&(g%100!==0||g%400===0)}function yR(g){let _=g.match(GO);if(!_)return!1;let E=+_[1],T=+_[2],R=+_[3];return T>=1&&T<=12&&R>=1&&R<=(T==2&&u3(E)?29:YO[T])}function vR(g,_){let E=_.match(WO);if(!E)return!1;let T=+E[1],R=+E[2],w=+E[3],B=!!E[5];return(T<=23&&R<=59&&w<=59||T==23&&R==59&&w==60)&&(!g||B)}var c3=/t|\s/i;function l3(g){let _=g.split(c3);return _.length==2&&yR(_[0])&&vR(!0,_[1])}var d3=/\/|:/,p3=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function m3(g){return d3.test(g)&&p3.test(g)}var f3=/[^\\]\\Z/;function h3(g){if(f3.test(g))return!1;try{return new RegExp(g,"u"),!0}catch(_){return!1}}var b3;b3=globalThis.crypto;var Ql=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthClientFlowError"})}static[Symbol.hasInstance](g){return Xr(this,g)}static isInstance(g){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Xr(this,g)}constructor(g){super(g);this.name=new.target.name,Ms(this,new.target)}},dY=class extends Ql{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.IssuerMismatchError"})}kind;expected;received;constructor(g,_,E){super(`Issuer mismatch in ${g==="metadata"?"authorization server metadata (RFC 8414 §3.3)":"authorization response (RFC 9207)"}: expected ${JSON.stringify(_)}, received ${JSON.stringify(E)}`);this.kind=g,this.expected=_,this.received=E}},pY=class extends Ql{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.RegistrationRejectedError"})}status;body;submittedMetadata;constructor(g){super(`Dynamic Client Registration rejected (HTTP ${g.status}): ${g.body}`);this.status=g.status,this.body=g.body,this.submittedMetadata=g.submittedMetadata}},mY=class extends Ql{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsecureTokenEndpointError"})}tokenEndpoint;constructor(g){super(`Refusing to send credentials to non-https token endpoint '${g}'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`);this.tokenEndpoint=g}},fY=class extends Ql{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.AuthorizationServerMismatchError"})}constructor(g,_){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(g)} but this call resolved ${JSON.stringify(_)}; refusing to present them to a different authorization server`);this.recordedIssuer=g,this.currentIssuer=_}},hY=class extends Ql{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsufficientScopeError"})}requiredScope;resourceMetadataUrl;errorDescription;constructor(g){super(`Insufficient scope${g.requiredScope?`: required "${g.requiredScope}"`:""}`);this.requiredScope=g.requiredScope,this.resourceMetadataUrl=g.resourceMetadataUrl,this.errorDescription=g.errorDescription}};var gY=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnauthorizedError"})}static[Symbol.hasInstance](g){return Xr(this,g)}static isInstance(g){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Xr(this,g)}constructor(g){super(g??"Unauthorized");this.name="UnauthorizedError",Ms(this,new.target)}};var bY=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SseError"})}static[Symbol.hasInstance](g){return Xr(this,g)}static isInstance(g){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Xr(this,g)}constructor(g,_,E){super(`SSE error: ${_}`);this.code=g,this.event=E,Ms(this,new.target)}};class wR{_eventSlots=new Map;setHandler(g,_){let E=this._ensureEventSlot(g);if(E.onHandler&&_)console.warn(`[MCP Apps] on${String(g)} handler replaced. Use addEventListener("${String(g)}", …) to add multiple listeners without replacing.`);E.onHandler=_}getHandler(g){return this._eventSlots.get(g)?.onHandler}addEventListener(g,_){this._ensureEventSlot(g).listeners.push(_)}removeEventListener(g,_){let E=this._eventSlots.get(g);if(!E)return;let T=E.listeners.indexOf(_);if(T!==-1)E.listeners.splice(T,1)}dispatch(g,_){let E=this._eventSlots.get(g);if(!E)return;E.onHandler?.(_);for(let T of[...E.listeners])T(_)}_ensureEventSlot(g){let _=this._eventSlots.get(g);if(!_)_={listeners:[]},this._eventSlots.set(g,_);return _}}class AR{_methods=new Set;claim(g,_){if(this._methods.has(g))throw Error(`Handler for "${g}" already registered (via ${_}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(g)}replace(g){this._methods.add(g)}release(g){this._methods.delete(g)}has(g){return this._methods.has(g)}}var xR=new Set;function RR(g,_){let[E,T]=_,R=E?.shape;if(typeof R?.method?.value!=="string")return;let w=R.method.value,B=g==="request"?"setRequestHandler":"setNotificationHandler";if(!xR.has(B))xR.add(B),console.warn(`[ext-apps] ${B}(Schema, handler) is deprecated; use ${B}("${w}", { params: Schema.shape.params }, handler).`);let Z=T;return[w,{params:R.params},g==="request"?(K,X)=>Z({method:w,params:K},S3(X)):(K)=>Z({method:w,params:K})]}function S3(g){return{signal:g.mcpReq.signal,requestId:g.mcpReq.id,sessionId:g.sessionId,_meta:g.mcpReq._meta,sendRequest:g.mcpReq.send,sendNotification:g.mcpReq.notify,authInfo:g.http?.authInfo}}var PR="2026-01-26";var zR="ui/notifications/sandbox-proxy-ready";var _3="ui/notifications/tool-input-partial";var E3=Ke([pe("light"),pe("dark")]).describe("Color theme preference for the host environment."),ed=Ke([pe("inline"),pe("fullscreen"),pe("pip")]).describe("Display mode for UI presentation."),T3=Ke([pe("--color-background-primary"),pe("--color-background-secondary"),pe("--color-background-tertiary"),pe("--color-background-inverse"),pe("--color-background-ghost"),pe("--color-background-info"),pe("--color-background-danger"),pe("--color-background-success"),pe("--color-background-warning"),pe("--color-background-disabled"),pe("--color-text-primary"),pe("--color-text-secondary"),pe("--color-text-tertiary"),pe("--color-text-inverse"),pe("--color-text-ghost"),pe("--color-text-info"),pe("--color-text-danger"),pe("--color-text-success"),pe("--color-text-warning"),pe("--color-text-disabled"),pe("--color-border-primary"),pe("--color-border-secondary"),pe("--color-border-tertiary"),pe("--color-border-inverse"),pe("--color-border-ghost"),pe("--color-border-info"),pe("--color-border-danger"),pe("--color-border-success"),pe("--color-border-warning"),pe("--color-border-disabled"),pe("--color-ring-primary"),pe("--color-ring-secondary"),pe("--color-ring-inverse"),pe("--color-ring-info"),pe("--color-ring-danger"),pe("--color-ring-success"),pe("--color-ring-warning"),pe("--font-sans"),pe("--font-mono"),pe("--font-weight-normal"),pe("--font-weight-medium"),pe("--font-weight-semibold"),pe("--font-weight-bold"),pe("--font-text-xs-size"),pe("--font-text-sm-size"),pe("--font-text-md-size"),pe("--font-text-lg-size"),pe("--font-heading-xs-size"),pe("--font-heading-sm-size"),pe("--font-heading-md-size"),pe("--font-heading-lg-size"),pe("--font-heading-xl-size"),pe("--font-heading-2xl-size"),pe("--font-heading-3xl-size"),pe("--font-text-xs-line-height"),pe("--font-text-sm-line-height"),pe("--font-text-md-line-height"),pe("--font-text-lg-line-height"),pe("--font-heading-xs-line-height"),pe("--font-heading-sm-line-height"),pe("--font-heading-md-line-height"),pe("--font-heading-lg-line-height"),pe("--font-heading-xl-line-height"),pe("--font-heading-2xl-line-height"),pe("--font-heading-3xl-line-height"),pe("--border-radius-xs"),pe("--border-radius-sm"),pe("--border-radius-md"),pe("--border-radius-lg"),pe("--border-radius-xl"),pe("--border-radius-full"),pe("--border-width-regular"),pe("--shadow-hairline"),pe("--shadow-sm"),pe("--shadow-md"),pe("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),y3=je(T3.describe(`Style variables for theming MCP apps.
|
|
63
|
+
|
|
64
|
+
Individual style keys are optional - hosts may provide any subset of these values.
|
|
65
|
+
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
66
|
+
|
|
67
|
+
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
68
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),Ke([ne(),Hg()]).describe(`Style variables for theming MCP apps.
|
|
69
|
+
|
|
70
|
+
Individual style keys are optional - hosts may provide any subset of these values.
|
|
71
|
+
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
72
|
+
|
|
73
|
+
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
74
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.
|
|
75
|
+
|
|
76
|
+
Individual style keys are optional - hosts may provide any subset of these values.
|
|
77
|
+
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
78
|
+
|
|
79
|
+
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
80
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),v3=de({method:pe("ui/open-link"),params:de({url:ne().describe("URL to open in the host's browser")})}),x3=de({isError:et().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),R3=de({isError:et().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),k3=de({isError:et().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough(),I3=de({method:pe("ui/notifications/sandbox-proxy-ready"),params:de({})}),_0=de({connectDomains:Ce(ne()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
|
|
81
|
+
|
|
82
|
+
- Maps to CSP \`connect-src\` directive
|
|
83
|
+
- Empty or omitted → no network connections (secure default)`),resourceDomains:Ce(ne()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:Ce(ne()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:Ce(ne()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),E0=de({camera:de({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:de({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:de({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:de({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")}),C3=de({method:pe("ui/notifications/size-changed"),params:de({width:Me().optional().describe("New width in pixels."),height:Me().optional().describe("New height in pixels.")})}),NY=de({method:pe("ui/notifications/tool-input"),params:de({arguments:je(ne(),gt().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),OY=de({method:pe("ui/notifications/tool-input-partial"),params:de({arguments:je(ne(),gt().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),MY=de({method:pe("ui/notifications/tool-cancelled"),params:de({reason:ne().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),w3=de({fonts:ne().optional()}),A3=de({variables:y3.optional().describe("CSS variables for theming the app."),css:w3.optional().describe("CSS blocks that apps can inject.")}),LY=de({method:pe("ui/resource-teardown"),params:de({})}),P3=je(ne(),gt()),kR=de({text:de({}).optional().describe("Host supports text content blocks."),image:de({}).optional().describe("Host supports image content blocks."),audio:de({}).optional().describe("Host supports audio content blocks."),resource:de({}).optional().describe("Host supports resource content blocks."),resourceLink:de({}).optional().describe("Host supports resource link content blocks."),structuredContent:de({}).optional().describe("Host supports structured content.")}),z3=de({method:pe("ui/notifications/request-teardown"),params:de({}).optional()}),N3=de({experimental:je(ne(),je(ne(),Xp()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),openLinks:de({}).optional().describe("Host supports opening external URLs."),downloadFile:de({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:de({listChanged:et().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:de({listChanged:et().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:de({}).optional().describe("Host accepts log messages."),sandbox:de({permissions:E0.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:_0.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:kR.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:kR.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:de({tools:de({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),O3=de({experimental:je(ne(),je(ne(),Xp()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),tools:de({listChanged:et().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:Ce(ed).optional().describe("Display modes the app supports.")}),M3=de({method:pe("ui/notifications/initialized"),params:de({}).optional()}),DY=de({csp:_0.optional().describe("Content Security Policy configuration for UI resources."),permissions:E0.optional().describe("Sandbox permissions requested by the UI resource."),domain:ne().optional().describe(`Dedicated origin for view sandbox.
|
|
84
|
+
|
|
85
|
+
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
86
|
+
|
|
87
|
+
**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:
|
|
88
|
+
- Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
|
|
89
|
+
- URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)
|
|
90
|
+
|
|
91
|
+
If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:et().optional().describe(`Visual boundary preference - true if view prefers a visible border.
|
|
92
|
+
|
|
93
|
+
Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.
|
|
94
|
+
|
|
95
|
+
- \`true\`: request visible border + background
|
|
96
|
+
- \`false\`: request no visible border + background
|
|
97
|
+
- omitted: host decides border`)}),IR=de({method:pe("ui/request-display-mode"),params:de({mode:ed.describe("The display mode being requested.")})}),CR=de({mode:ed.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),L3=Ke([pe("model"),pe("app")]).describe("Tool visibility scope - who can access the tool."),$Y=de({resourceUri:ne().optional(),visibility:Ce(L3).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
98
|
+
- "model": Tool visible to and callable by the agent
|
|
99
|
+
- "app": Tool callable by the app from this server only`),csp:qg().optional(),permissions:qg().optional()}),UY=de({mimeTypes:Ce(ne()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),D3=de({method:pe("ui/download-file"),params:de({contents:Ce(Ke([ws,As])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),$3=de({method:pe("ui/message"),params:de({role:pe("user").describe('Message role, currently only "user" is supported.'),content:Ce(Ko).describe("Message content blocks (text, image, etc.).")})}),FY=de({method:pe("ui/notifications/sandbox-resource-ready"),params:de({html:ne().describe("HTML content to load into the inner iframe."),sandbox:ne().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:_0.optional().describe("CSP configuration from resource metadata."),permissions:E0.optional().describe("Sandbox permissions from resource metadata.")})}),BY=de({method:pe("ui/notifications/tool-result"),params:Zi.describe("Standard MCP tool execution result.")}),NR=de({toolInfo:de({id:vo.optional().describe("JSON-RPC id of the tools/call request."),tool:ji.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:E3.optional().describe("Current color theme preference."),styles:A3.optional().describe("Style configuration for theming the app."),displayMode:ed.optional().describe("How the UI is currently displayed."),availableDisplayModes:Ce(ed).optional().describe("Display modes the host supports."),containerDimensions:Ke([de({height:Me().describe("Fixed container height in pixels.")}),de({maxHeight:Ke([Me(),Hg()]).optional().describe("Maximum container height in pixels.")})]).and(Ke([de({width:Me().describe("Fixed container width in pixels.")}),de({maxWidth:Ke([Me(),Hg()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
100
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:ne().optional().describe("User's language and region preference in BCP 47 format."),timeZone:ne().optional().describe("User's timezone in IANA format."),userAgent:ne().optional().describe("Host application identifier."),platform:Ke([pe("web"),pe("desktop"),pe("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:de({touch:et().optional().describe("Whether the device supports touch input."),hover:et().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:de({top:Me().describe("Top safe area inset in pixels."),right:Me().describe("Right safe area inset in pixels."),bottom:Me().describe("Bottom safe area inset in pixels."),left:Me().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),HY=de({method:pe("ui/notifications/host-context-changed"),params:NR.describe("Partial context update containing only changed fields.")}),U3=de({method:pe("ui/update-model-context"),params:de({content:Ce(Ko).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:je(ne(),gt().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),F3=de({method:pe("ui/initialize"),params:de({appInfo:Yo.describe("App identification (name and version)."),appCapabilities:O3.describe("Features and capabilities this app provides."),protocolVersion:ne().describe("Protocol version this app supports.")})}),B3=de({protocolVersion:ne().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Yo.describe("Host application identification and version."),hostCapabilities:N3.describe("Features and capabilities provided by the host."),hostContext:NR.describe("Rich context about the host environment.")}).passthrough(),H3="ui/resourceUri",ja="text/html;profile=mcp-app";class Om{eventTarget;eventSource;messageListener;constructor(g=window.parent,_){this.eventTarget=g,this.eventSource=_,this.messageListener=(E)=>{if(_&&E.source!==this.eventSource){console.debug("Ignoring message from unknown source",E);return}let T=xs.safeParse(E.data);if(T.success)console.debug("Parsed message",T.data),this.onmessage?.(T.data);else if(E.data?.jsonrpc!=="2.0")console.debug("Ignoring non-JSON-RPC message",T.error.message,E);else console.error("Failed to parse message",T.error.message,E),this.onerror?.(Error("Invalid JSON-RPC message received: "+T.error.message))}}async start(){window.addEventListener("message",this.messageListener)}async send(g,_){if(g.method!==_3)console.debug("Sending message",g);this.eventTarget.postMessage(g,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}function OR(g){let _=g._meta?.ui?.resourceUri;if(_===void 0)_=g._meta?.[H3];if(typeof _==="string"&&_.startsWith("ui://"))return _;else if(_!==void 0)throw Error(`Invalid UI resource URI: ${JSON.stringify(_)}`);return}var q3=[PR];class Mm extends S0{_client;_hostInfo;_hostCapabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_registeredEvents=new Set;_events=new wR;_methods=new AR;setRequestHandler=(...g)=>{let[_,...E]=RR("request",g)??g;this._methods.claim(_,"setRequestHandler"),super.setRequestHandler.call(this,_,...E)};setNotificationHandler=(...g)=>{let[_,...E]=RR("notification",g)??g;this._methods.claim(_,"setNotificationHandler"),super.setNotificationHandler.call(this,_,...E)};removeRequestHandler=(g)=>{this._methods.release(g),super.removeRequestHandler(g)};removeNotificationHandler=(g)=>{this._methods.release(g),super.removeNotificationHandler(g)};replaceRequestHandler=(g,..._)=>{this._methods.replace(g),super.setRequestHandler.call(this,g,..._)};_wrapHandler(g,_){let E=super._wrapHandler(g,_);if(g==="ui/initialize"||g==="ping")return E;return async(T,R)=>{if(!this._initializedReceived)console.warn(`[ext-apps] AppBridge received '${g}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`);return E(T,R)}}eventSchemas={sizechange:C3,sandboxready:I3,initialized:M3,requestteardown:z3,loggingmessage:Ps};setEventHandler(g,_){this._ensureEventSlot(g),this._events.setHandler(g,_)}getEventHandler(g){return this._events.getHandler(g)}addEventListener(g,_){this._ensureEventSlot(g),this._events.addEventListener(g,_)}removeEventListener(g,_){this._events.removeEventListener(g,_)}_ensureEventSlot(g){if(this._registeredEvents.has(g))return;let _=this.eventSchemas[g];if(!_)throw Error(`Unknown event: ${String(g)}`);let E=(T)=>{if(g==="initialized")this._initializedReceived=!0;this._events.dispatch(g,T)};if(g==="loggingmessage")this.setNotificationHandler("notifications/message",(T)=>{E(T.params)});else this.setNotificationHandler(_.shape.method.value,{params:_.shape.params},(T)=>E(T));this._registeredEvents.add(g)}warnIfRequestHandlerReplaced(g,_,E){if(_&&E)console.warn(`[MCP Apps] ${g} handler replaced. Previous handler will no longer be called.`)}constructor(g,_,E,T){super(T);this._client=g,this._hostInfo=_,this._hostCapabilities=E,this._methods.replace("notifications/cancelled"),this._methods.replace("notifications/progress"),this._ensureEventSlot("initialized"),this._hostContext=T?.hostContext||{},this.replaceRequestHandler("ui/initialize",{params:F3.shape.params,result:B3},(R)=>this._onAppsInitialize(R)),this.replaceRequestHandler("ping",(R,w)=>(this.onping?.(R.params,w),{})),this.replaceRequestHandler("ui/request-display-mode",{params:IR.shape.params,result:CR},()=>({mode:this._hostContext.displayMode??"inline"}))}buildContext(g){return g}assertCapabilityForMethod(g){}assertRequestHandlerCapability(g){}assertNotificationCapability(g){}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler("sizechange")}set onsizechange(g){this.setEventHandler("sizechange",g)}get onsandboxready(){return this.getEventHandler("sandboxready")}set onsandboxready(g){this.setEventHandler("sandboxready",g)}get oninitialized(){return this.getEventHandler("initialized")}set oninitialized(g){this.setEventHandler("initialized",g)}_onmessage;get onmessage(){return this._onmessage}set onmessage(g){this.warnIfRequestHandlerReplaced("onmessage",this._onmessage,g),this._onmessage=g,this.replaceRequestHandler("ui/message",{params:$3.shape.params,result:k3},async(_,E)=>{if(!this._onmessage)throw Error("No onmessage handler set");return this._onmessage(_,E)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(g){this.warnIfRequestHandlerReplaced("onopenlink",this._onopenlink,g),this._onopenlink=g,this.replaceRequestHandler("ui/open-link",{params:v3.shape.params,result:x3},async(_,E)=>{if(!this._onopenlink)throw Error("No onopenlink handler set");return this._onopenlink(_,E)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(g){this.warnIfRequestHandlerReplaced("ondownloadfile",this._ondownloadfile,g),this._ondownloadfile=g,this.replaceRequestHandler("ui/download-file",{params:D3.shape.params,result:R3},async(_,E)=>{if(!this._ondownloadfile)throw Error("No ondownloadfile handler set");return this._ondownloadfile(_,E)})}get onrequestteardown(){return this.getEventHandler("requestteardown")}set onrequestteardown(g){this.setEventHandler("requestteardown",g)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(g){this.warnIfRequestHandlerReplaced("onrequestdisplaymode",this._onrequestdisplaymode,g),this._onrequestdisplaymode=g,this.replaceRequestHandler("ui/request-display-mode",{params:IR.shape.params,result:CR},async(_,E)=>{if(!this._onrequestdisplaymode)throw Error("No onrequestdisplaymode handler set");return this._onrequestdisplaymode(_,E)})}get onloggingmessage(){return this.getEventHandler("loggingmessage")}set onloggingmessage(g){this.setEventHandler("loggingmessage",g)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(g){this.warnIfRequestHandlerReplaced("onupdatemodelcontext",this._onupdatemodelcontext,g),this._onupdatemodelcontext=g,this.replaceRequestHandler("ui/update-model-context",{params:U3.shape.params,result:qi},async(_,E)=>{if(!this._onupdatemodelcontext)throw Error("No onupdatemodelcontext handler set");return this._onupdatemodelcontext(_,E)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(g){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,g),this._oncalltool=g,this.replaceRequestHandler("tools/call",async(_,E)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(_.params,E)})}_oncreatesamplingmessage;get oncreatesamplingmessage(){return this._oncreatesamplingmessage}set oncreatesamplingmessage(g){this.warnIfRequestHandlerReplaced("oncreatesamplingmessage",this._oncreatesamplingmessage,g),this._oncreatesamplingmessage=g,this.replaceRequestHandler("sampling/createMessage",async(_,E)=>{if(!this._oncreatesamplingmessage)throw Error("No oncreatesamplingmessage handler set");return this._oncreatesamplingmessage(_.params,E)})}sendToolListChanged(g={}){return this.notification({method:"notifications/tools/list_changed",params:g})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(g){this.warnIfRequestHandlerReplaced("onlistresources",this._onlistresources,g),this._onlistresources=g,this.replaceRequestHandler("resources/list",async(_,E)=>{if(!this._onlistresources)throw Error("No onlistresources handler set");return this._onlistresources(_.params,E)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(g){this.warnIfRequestHandlerReplaced("onlistresourcetemplates",this._onlistresourcetemplates,g),this._onlistresourcetemplates=g,this.replaceRequestHandler("resources/templates/list",async(_,E)=>{if(!this._onlistresourcetemplates)throw Error("No onlistresourcetemplates handler set");return this._onlistresourcetemplates(_.params,E)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(g){this.warnIfRequestHandlerReplaced("onreadresource",this._onreadresource,g),this._onreadresource=g,this.replaceRequestHandler("resources/read",async(_,E)=>{if(!this._onreadresource)throw Error("No onreadresource handler set");return this._onreadresource(_.params,E)})}sendResourceListChanged(g={}){return this.notification({method:"notifications/resources/list_changed",params:g})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(g){this.warnIfRequestHandlerReplaced("onlistprompts",this._onlistprompts,g),this._onlistprompts=g,this.replaceRequestHandler("prompts/list",async(_,E)=>{if(!this._onlistprompts)throw Error("No onlistprompts handler set");return this._onlistprompts(_.params,E)})}sendPromptListChanged(g={}){return this.notification({method:"notifications/prompts/list_changed",params:g})}getCapabilities(){return this._hostCapabilities}async _onAppsInitialize(g){let _=g.protocolVersion;if(this._appInfo!==void 0)console.warn("[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values.");return this._appCapabilities=g.appCapabilities,this._appInfo=g.appInfo,{protocolVersion:q3.includes(_)?_:PR,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(g){let _={},E=!1;for(let T of Object.keys(g)){let R=this._hostContext[T],w=g[T];if(j3(R,w))continue;_[T]=w,E=!0}if(E)this._hostContext=g,this.sendHostContextChange(_)}sendHostContextChange(g){return this.notification({method:"ui/notifications/host-context-changed",params:g})}sendToolInput(g){return this.notification({method:"ui/notifications/tool-input",params:g})}sendToolInputPartial(g){return this.notification({method:"ui/notifications/tool-input-partial",params:g})}sendToolResult(g){return this.notification({method:"ui/notifications/tool-result",params:g})}sendToolCancelled(g){return this.notification({method:"ui/notifications/tool-cancelled",params:g})}sendSandboxResourceReady(g){return this.notification({method:"ui/notifications/sandbox-resource-ready",params:g})}teardownResource(g,_){return this.request({method:"ui/resource-teardown",params:g},P3,_)}sendResourceTeardown=this.teardownResource;callTool(g,_){return this.request({method:"tools/call",params:g},_)}listTools(g,_){return this.request({method:"tools/list",params:g},_)}async connect(g){if(this.transport)throw Error("AppBridge is already connected. Call close() before connecting again.");if(this._initializedReceived=!1,this._client){let _=this._client.getServerCapabilities();if(!_)throw Error("Client server capabilities not available");if(_.tools){if(this.oncalltool=async(E,T)=>this._client.request({method:"tools/call",params:E},{signal:T.mcpReq.signal}),_.tools.listChanged)this._client.setNotificationHandler("notifications/tools/list_changed",(E)=>this.sendToolListChanged(E.params))}if(_.resources){if(this.onlistresources=async(E,T)=>this._client.request({method:"resources/list",params:E},{signal:T.mcpReq.signal}),this.onlistresourcetemplates=async(E,T)=>this._client.request({method:"resources/templates/list",params:E},{signal:T.mcpReq.signal}),this.onreadresource=async(E,T)=>this._client.request({method:"resources/read",params:E},{signal:T.mcpReq.signal}),_.resources.listChanged)this._client.setNotificationHandler("notifications/resources/list_changed",(E)=>this.sendResourceListChanged(E.params))}if(_.prompts){if(this.onlistprompts=async(E,T)=>this._client.request({method:"prompts/list",params:E},{signal:T.mcpReq.signal}),_.prompts.listChanged)this._client.setNotificationHandler("notifications/prompts/list_changed",(E)=>this.sendPromptListChanged(E.params))}}return super.connect(g)}}function j3(g,_){return JSON.stringify(g)===JSON.stringify(_)}r();var Z3="io.modelcontextprotocol/related-task",Dm="2.0",Gn=Yv((g)=>g!==null&&(typeof g==="object"||typeof g==="function")),MR=Ke([ne(),Me().int()]),LR=ne(),ZY=xt({ttl:Me().optional(),pollInterval:Me().optional()}),V3=de({ttl:Me().optional()}),G3=de({taskId:ne()}),T0=xt({progressToken:MR.optional(),[Z3]:G3.optional()}),Qr=de({_meta:T0.optional()}),$m=Qr.extend({task:V3.optional()});var ur=de({method:ne(),params:Qr.loose().optional()}),so=de({_meta:T0.optional()}),ao=de({method:ne(),params:so.loose().optional()}),cr=xt({_meta:T0.optional()}),Um=Ke([ne(),Me().int()]),Y3=de({jsonrpc:pe(Dm),id:Um,...ur.shape}).strict();var W3=de({jsonrpc:pe(Dm),...ao.shape}).strict();var DR=de({jsonrpc:pe(Dm),id:Um,result:cr}).strict();var Gi;(function(g){g[g.ConnectionClosed=-32000]="ConnectionClosed",g[g.RequestTimeout=-32001]="RequestTimeout",g[g.ParseError=-32700]="ParseError",g[g.InvalidRequest=-32600]="InvalidRequest",g[g.MethodNotFound=-32601]="MethodNotFound",g[g.InvalidParams=-32602]="InvalidParams",g[g.InternalError=-32603]="InternalError",g[g.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(Gi||(Gi={}));var $R=de({jsonrpc:pe(Dm),id:Um.optional(),error:de({code:Me().int(),message:ne(),data:gt().optional()})}).strict();var VY=Ke([Y3,W3,DR,$R]),GY=Ke([DR,$R]),UR=cr.strict(),K3=so.extend({requestId:Um.optional(),reason:ne().optional()}),FR=ao.extend({method:pe("notifications/cancelled"),params:K3}),J3=de({src:ne(),mimeType:ne().optional(),sizes:Ce(ne()).optional(),theme:Ot(["light","dark"]).optional()}),td=de({icons:Ce(J3).optional()}),Za=de({name:ne(),title:ne().optional()}),BR=Za.extend({...Za.shape,...td.shape,version:ne(),websiteUrl:ne().optional(),description:ne().optional()}),X3=no(de({applyDefaults:et().optional()}),je(ne(),gt())),Q3=Zo((g)=>{if(g&&typeof g==="object"&&!Array.isArray(g)){if(Object.keys(g).length===0)return{form:{}}}return g},no(de({form:X3.optional(),url:Gn.optional()}),je(ne(),gt()).optional())),eM=xt({list:Gn.optional(),cancel:Gn.optional(),requests:xt({sampling:xt({createMessage:Gn.optional()}).optional(),elicitation:xt({create:Gn.optional()}).optional()}).optional()}),tM=xt({list:Gn.optional(),cancel:Gn.optional(),requests:xt({tools:xt({call:Gn.optional()}).optional()}).optional()}),nM=de({experimental:je(ne(),Gn).optional(),sampling:de({context:Gn.optional(),tools:Gn.optional()}).optional(),elicitation:Q3.optional(),roots:de({listChanged:et().optional()}).optional(),tasks:eM.optional(),extensions:je(ne(),Gn).optional()}),rM=Qr.extend({protocolVersion:ne(),capabilities:nM,clientInfo:BR}),oM=ur.extend({method:pe("initialize"),params:rM});var iM=de({experimental:je(ne(),Gn).optional(),logging:Gn.optional(),completions:Gn.optional(),prompts:de({listChanged:et().optional()}).optional(),resources:de({subscribe:et().optional(),listChanged:et().optional()}).optional(),tools:de({listChanged:et().optional()}).optional(),tasks:tM.optional(),extensions:je(ne(),Gn).optional()}),sM=cr.extend({protocolVersion:ne(),capabilities:iM,serverInfo:BR,instructions:ne().optional()}),aM=ao.extend({method:pe("notifications/initialized"),params:so.optional()});var HR=ur.extend({method:pe("ping"),params:Qr.optional()}),uM=de({progress:Me(),total:bt(Me()),message:bt(ne())}),cM=de({...so.shape,...uM.shape,progressToken:MR}),qR=ao.extend({method:pe("notifications/progress"),params:cM}),lM=Qr.extend({cursor:LR.optional()}),nd=ur.extend({params:lM.optional()}),rd=cr.extend({nextCursor:LR.optional()}),dM=Ot(["working","input_required","completed","failed","cancelled"]),od=de({taskId:ne(),status:dM,ttl:Ke([Me(),ai()]),createdAt:ne(),lastUpdatedAt:ne(),pollInterval:bt(Me()),statusMessage:bt(ne())}),jR=cr.extend({task:od}),pM=so.merge(od),ZR=ao.extend({method:pe("notifications/tasks/status"),params:pM}),VR=ur.extend({method:pe("tasks/get"),params:Qr.extend({taskId:ne()})}),GR=cr.merge(od),YR=ur.extend({method:pe("tasks/result"),params:Qr.extend({taskId:ne()})}),YY=cr.loose(),WR=nd.extend({method:pe("tasks/list")}),KR=rd.extend({tasks:Ce(od)}),JR=ur.extend({method:pe("tasks/cancel"),params:Qr.extend({taskId:ne()})}),WY=cr.merge(od),XR=de({uri:ne(),mimeType:bt(ne()),_meta:je(ne(),gt()).optional()}),QR=XR.extend({text:ne()}),y0=ne().refine((g)=>{try{return atob(g),!0}catch{return!1}},{message:"Invalid Base64 string"}),e1=XR.extend({blob:y0}),id=Ot(["user","assistant"]),Va=de({audience:Ce(id).optional(),priority:Me().min(0).max(1).optional(),lastModified:sc({offset:!0}).optional()}),t1=de({...Za.shape,...td.shape,uri:ne(),description:bt(ne()),mimeType:bt(ne()),size:bt(Me()),annotations:Va.optional(),_meta:bt(xt({}))}),mM=de({...Za.shape,...td.shape,uriTemplate:ne(),description:bt(ne()),mimeType:bt(ne()),annotations:Va.optional(),_meta:bt(xt({}))}),fM=nd.extend({method:pe("resources/list")}),hM=rd.extend({resources:Ce(t1)}),gM=nd.extend({method:pe("resources/templates/list")}),bM=rd.extend({resourceTemplates:Ce(mM)}),v0=Qr.extend({uri:ne()}),SM=v0,_M=ur.extend({method:pe("resources/read"),params:SM}),EM=cr.extend({contents:Ce(Ke([QR,e1]))}),TM=ao.extend({method:pe("notifications/resources/list_changed"),params:so.optional()}),yM=v0,vM=ur.extend({method:pe("resources/subscribe"),params:yM}),xM=v0,RM=ur.extend({method:pe("resources/unsubscribe"),params:xM}),kM=so.extend({uri:ne()}),IM=ao.extend({method:pe("notifications/resources/updated"),params:kM}),CM=de({name:ne(),description:bt(ne()),required:bt(et())}),wM=de({...Za.shape,...td.shape,description:bt(ne()),arguments:bt(Ce(CM)),_meta:bt(xt({}))}),AM=nd.extend({method:pe("prompts/list")}),PM=rd.extend({prompts:Ce(wM)}),zM=Qr.extend({name:ne(),arguments:je(ne(),ne()).optional()}),NM=ur.extend({method:pe("prompts/get"),params:zM}),x0=de({type:pe("text"),text:ne(),annotations:Va.optional(),_meta:je(ne(),gt()).optional()}),R0=de({type:pe("image"),data:y0,mimeType:ne(),annotations:Va.optional(),_meta:je(ne(),gt()).optional()}),k0=de({type:pe("audio"),data:y0,mimeType:ne(),annotations:Va.optional(),_meta:je(ne(),gt()).optional()}),OM=de({type:pe("tool_use"),name:ne(),id:ne(),input:je(ne(),gt()),_meta:je(ne(),gt()).optional()}),MM=de({type:pe("resource"),resource:Ke([QR,e1]),annotations:Va.optional(),_meta:je(ne(),gt()).optional()}),LM=t1.extend({type:pe("resource_link")}),I0=Ke([x0,R0,k0,LM,MM]),DM=de({role:id,content:I0}),$M=cr.extend({description:ne().optional(),messages:Ce(DM)}),UM=ao.extend({method:pe("notifications/prompts/list_changed"),params:so.optional()}),FM=de({title:ne().optional(),readOnlyHint:et().optional(),destructiveHint:et().optional(),idempotentHint:et().optional(),openWorldHint:et().optional()}),BM=de({taskSupport:Ot(["required","optional","forbidden"]).optional()}),n1=de({...Za.shape,...td.shape,description:ne().optional(),inputSchema:de({type:pe("object"),properties:je(ne(),Gn).optional(),required:Ce(ne()).optional()}).catchall(gt()),outputSchema:de({type:pe("object"),properties:je(ne(),Gn).optional(),required:Ce(ne()).optional()}).catchall(gt()).optional(),annotations:FM.optional(),execution:BM.optional(),_meta:je(ne(),gt()).optional()}),HM=nd.extend({method:pe("tools/list")}),qM=rd.extend({tools:Ce(n1)}),r1=cr.extend({content:Ce(I0).default([]),structuredContent:je(ne(),gt()).optional(),isError:et().optional()}),KY=r1.or(cr.extend({toolResult:gt()})),jM=$m.extend({name:ne(),arguments:je(ne(),gt()).optional()}),ZM=ur.extend({method:pe("tools/call"),params:jM}),VM=ao.extend({method:pe("notifications/tools/list_changed"),params:so.optional()}),JY=de({autoRefresh:et().default(!0),debounceMs:Me().int().nonnegative().default(300)}),o1=Ot(["debug","info","notice","warning","error","critical","alert","emergency"]),GM=Qr.extend({level:o1}),YM=ur.extend({method:pe("logging/setLevel"),params:GM}),WM=so.extend({level:o1,logger:ne().optional(),data:gt()}),KM=ao.extend({method:pe("notifications/message"),params:WM}),JM=de({name:ne().optional()}),XM=de({hints:Ce(JM).optional(),costPriority:Me().min(0).max(1).optional(),speedPriority:Me().min(0).max(1).optional(),intelligencePriority:Me().min(0).max(1).optional()}),QM=de({mode:Ot(["auto","required","none"]).optional()}),eL=de({type:pe("tool_result"),toolUseId:ne().describe("The unique identifier for the corresponding tool call."),content:Ce(I0).default([]),structuredContent:de({}).loose().optional(),isError:et().optional(),_meta:je(ne(),gt()).optional()}),tL=ui("type",[x0,R0,k0]),Lm=ui("type",[x0,R0,k0,OM,eL]),nL=de({role:id,content:Ke([Lm,Ce(Lm)]),_meta:je(ne(),gt()).optional()}),rL=$m.extend({messages:Ce(nL),modelPreferences:XM.optional(),systemPrompt:ne().optional(),includeContext:Ot(["none","thisServer","allServers"]).optional(),temperature:Me().optional(),maxTokens:Me().int(),stopSequences:Ce(ne()).optional(),metadata:Gn.optional(),tools:Ce(n1).optional(),toolChoice:QM.optional()}),oL=ur.extend({method:pe("sampling/createMessage"),params:rL}),iL=cr.extend({model:ne(),stopReason:bt(Ot(["endTurn","stopSequence","maxTokens"]).or(ne())),role:id,content:tL}),sL=cr.extend({model:ne(),stopReason:bt(Ot(["endTurn","stopSequence","maxTokens","toolUse"]).or(ne())),role:id,content:Ke([Lm,Ce(Lm)])}),aL=de({type:pe("boolean"),title:ne().optional(),description:ne().optional(),default:et().optional()}),uL=de({type:pe("string"),title:ne().optional(),description:ne().optional(),minLength:Me().optional(),maxLength:Me().optional(),format:Ot(["email","uri","date","date-time"]).optional(),default:ne().optional()}),cL=de({type:Ot(["number","integer"]),title:ne().optional(),description:ne().optional(),minimum:Me().optional(),maximum:Me().optional(),default:Me().optional()}),lL=de({type:pe("string"),title:ne().optional(),description:ne().optional(),enum:Ce(ne()),default:ne().optional()}),dL=de({type:pe("string"),title:ne().optional(),description:ne().optional(),oneOf:Ce(de({const:ne(),title:ne()})),default:ne().optional()}),pL=de({type:pe("string"),title:ne().optional(),description:ne().optional(),enum:Ce(ne()),enumNames:Ce(ne()).optional(),default:ne().optional()}),mL=Ke([lL,dL]),fL=de({type:pe("array"),title:ne().optional(),description:ne().optional(),minItems:Me().optional(),maxItems:Me().optional(),items:de({type:pe("string"),enum:Ce(ne())}),default:Ce(ne()).optional()}),hL=de({type:pe("array"),title:ne().optional(),description:ne().optional(),minItems:Me().optional(),maxItems:Me().optional(),items:de({anyOf:Ce(de({const:ne(),title:ne()}))}),default:Ce(ne()).optional()}),gL=Ke([fL,hL]),bL=Ke([pL,mL,gL]),SL=Ke([bL,aL,uL,cL]),_L=$m.extend({mode:pe("form").optional(),message:ne(),requestedSchema:de({type:pe("object"),properties:je(ne(),SL),required:Ce(ne()).optional()})}),EL=$m.extend({mode:pe("url"),message:ne(),elicitationId:ne(),url:ne().url()}),TL=Ke([_L,EL]),yL=ur.extend({method:pe("elicitation/create"),params:TL}),vL=so.extend({elicitationId:ne()}),xL=ao.extend({method:pe("notifications/elicitation/complete"),params:vL}),RL=cr.extend({action:Ot(["accept","decline","cancel"]),content:Zo((g)=>g===null?void 0:g,je(ne(),Ke([ne(),Me(),et(),Ce(ne())])).optional())}),kL=de({type:pe("ref/resource"),uri:ne()});var IL=de({type:pe("ref/prompt"),name:ne()}),CL=Qr.extend({ref:Ke([IL,kL]),argument:de({name:ne(),value:ne()}),context:de({arguments:je(ne(),ne()).optional()}).optional()}),wL=ur.extend({method:pe("completion/complete"),params:CL});var AL=cr.extend({completion:xt({values:Ce(ne()).max(100),total:bt(Me().int()),hasMore:bt(et())})}),PL=de({uri:ne().startsWith("file://"),name:ne().optional(),_meta:je(ne(),gt()).optional()}),zL=ur.extend({method:pe("roots/list"),params:Qr.optional()}),NL=cr.extend({roots:Ce(PL)}),OL=ao.extend({method:pe("notifications/roots/list_changed"),params:so.optional()}),XY=Ke([HR,oM,wL,YM,NM,AM,fM,gM,_M,vM,RM,ZM,HM,VR,YR,WR,JR]),QY=Ke([FR,qR,aM,OL,ZR]),eW=Ke([UR,iL,sL,RL,NL,GR,KR,jR]),tW=Ke([HR,oL,yL,zL,VR,YR,WR,JR]),nW=Ke([FR,qR,KM,IM,TM,VM,UM,ZR,xL]),rW=Ke([UR,sM,AL,$M,PM,hM,bM,EM,r1,qM,GR,KR,jR]);class Ls extends Error{constructor(g,_,E){super(`MCP error ${g}: ${_}`);this.code=g,this.data=E,this.name="McpError"}static fromError(g,_,E){if(g===Gi.UrlElicitationRequired&&E){let T=E;if(T.elicitations)return new i1(T.elicitations,_)}return new Ls(g,_,E)}}class i1 extends Ls{constructor(g,_=`URL elicitation${g.length>1?"s":""} required`){super(Gi.UrlElicitationRequired,_,{elicitations:g})}get elicitations(){return this.data?.elicitations??[]}}r();var Ds=void 0;var ML="io.modelcontextprotocol/ui",LL={mimeTypes:[ja]},aW={[ML]:LL},DL=1e4;async function $L(g,_,E=DL){let T=document.createElement("iframe");T.style.width="100%",T.style.height="600px",T.style.border="none",T.style.backgroundColor="transparent",T.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms");let R=new Promise((w,B)=>{let Z=!1,K=()=>{window.removeEventListener("message",ee),T.removeEventListener("error",re)},X=setTimeout(()=>{if(!Z)Z=!0,K(),B(Error("Timed out waiting for sandbox proxy iframe to be ready"))},E);if(_)_.cancel=()=>{if(!Z)Z=!0,clearTimeout(X),K(),w()};let ee=(ie)=>{if(ie.source===T.contentWindow){if(ie.data&&ie.data.method===zR){if(!Z)Z=!0,clearTimeout(X),K(),w()}}},re=()=>{if(!Z)Z=!0,clearTimeout(X),K(),B(Error("Failed to load sandbox proxy iframe"))};window.addEventListener("message",ee),T.addEventListener("error",re)});return T.src=g.href,{iframe:T,onReady:R}}async function UL(g,_){let E,T=void 0;do{let w=await g.listTools({cursor:T});E=w.tools.find((B)=>B.name===_),T=w.nextCursor}while(!E&&T);if(!E)throw Error(`tool ${_} not found`);if(!E._meta)return null;let R=OR(E);if(!R)return null;if(!R.startsWith("ui://"))throw Error(`tool ${_} has unsupported output template URI: ${R}`);return{uri:R}}async function FL(g,_){let E=await g.readResource({uri:_.uri});if(!E)throw Error("UI resource not found: "+_.uri);if(E.contents.length!==1)throw Error("Unsupported UI resource content length: "+E.contents.length);let T=E.contents[0],R,w=(B)=>B===ja;if("text"in T&&typeof T.text==="string"&&w(T.mimeType))R=T.text;else if("blob"in T&&typeof T.blob==="string"&&w(T.mimeType))R=atob(T.blob);else throw Error("Unsupported UI resource content format: "+JSON.stringify(T));return R}function BL(g,_){let E=new URL(g.href);if(_&&Object.keys(_).length>0)E.searchParams.set("csp",JSON.stringify(_));return E}var HL=(g)=>{let{html:_,sandbox:E,appBridge:T,onSizeChanged:R,onInitialized:w,toolInput:B,toolResult:Z,onError:K}=g,[X,ee]=n(!1),[re,ie]=n(!1),[se,ae]=n(null),fe=o(null),xe=o(null),Ee=o(null),Ae=o(null),Re=o(R),Ve=o(w),Ge=o(K);return i(()=>{Re.current=R,Ve.current=w,Ge.current=K}),i(()=>{let ke=BL(E.url,E.csp),qe=ke.href;if(Ee.current===qe&&Ae.current===T&&xe.current)return;ee(!1),ie(!1),ae(null);let pt=!0,ht={};return(async()=>{try{if(xe.current&&fe.current?.contains(xe.current))fe.current.removeChild(xe.current),xe.current=null,Ee.current=null,Ae.current=null;let{iframe:Rt,onReady:Nt}=await $L(ke,ht);if(!pt)return;if(xe.current=Rt,Ee.current=qe,Ae.current=T,fe.current)fe.current.appendChild(Rt);if(await Nt,!pt)return;if(T.onsizechange=async(mt)=>{if(Re.current?.(mt),xe.current){if(mt.width!==void 0)xe.current.style.width=`${mt.width}px`;if(mt.height!==void 0)xe.current.style.height=`${mt.height}px`}},T.oninitialized=()=>{if(!pt)return;console.log("[AppFrame] App initialized"),ee(!0),Ve.current?.({appVersion:T.getAppVersion(),appCapabilities:T.getAppCapabilities()})},await T.connect(new Om(Rt.contentWindow,Rt.contentWindow)),!pt)return;ie(!0)}catch(Rt){if(console.error("[AppFrame] Error:",Rt),!pt)return;let Nt=Rt instanceof Error?Rt:Error(String(Rt));ae(Nt),Ge.current?.(Nt)}})(),()=>{pt=!1,ht.cancel?.()}},[E.url,E.csp,T]),i(()=>{if(!re||!_||Ae.current!==T)return;(async()=>{try{console.log("[AppFrame] Sending HTML to sandbox"),await T.sendSandboxResourceReady({html:_,csp:E.csp})}catch(qe){let pt=qe instanceof Error?qe:Error(String(qe));ae(pt),Ge.current?.(pt)}})()},[re,_,T,E.csp]),i(()=>{if(re&&X&&B&&Ae.current===T)console.log("[AppFrame] Sending tool input:",B),T.sendToolInput({arguments:B})},[T,re,X,B]),i(()=>{if(re&&X&&Z&&Ae.current===T)console.log("[AppFrame] Sending tool result:",Z),T.sendToolResult(Z)},[T,re,X,Z]),Ds("div",{ref:fe,style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"},children:se&&Ds("div",{style:{color:"red",padding:"1rem"},children:["Error: ",se.message]},void 0,!0,void 0,null)},void 0,!1,void 0,null)},C0=a((g,_)=>{let{client:E,toolName:T,sandbox:R,toolResourceUri:w,html:B,toolInput:Z,toolResult:K,toolInputPartial:X,toolCancelled:ee,hostContext:re,hostInfo:ie,hostCapabilities:se,onMessage:ae,onOpenLink:fe,onLoggingMessage:xe,onSizeChanged:Ee,onError:Ae,onCallTool:Re,onListResources:Ve,onListResourceTemplates:Ge,onReadResource:ke,onListPrompts:qe,onFallbackRequest:pt}=g,[ht,Oe]=n(null),[Rt,Nt]=n(B??null),[mt,_t]=n(null),We=o(ae),At=o(fe),Et=o(xe),jt=o(Ee),Ut=o(Ae),ye=o(Re),on=o(Ve),qt=o(Ge),ve=o(ke),tn=o(qe),nn=o(pt);i(()=>{We.current=ae,At.current=fe,Et.current=xe,jt.current=Ee,Ut.current=Ae,ye.current=Re,on.current=Ve,qt.current=Ge,ve.current=ke,tn.current=qe,nn.current=pt}),ue(_,()=>({sendToolListChanged:()=>ht?.sendToolListChanged(),sendResourceListChanged:()=>ht?.sendResourceListChanged(),sendPromptListChanged:()=>ht?.sendPromptListChanged(),teardownResource:()=>ht?.teardownResource({})}),[ht]),i(()=>{let Kt=!0,Wt=null;return(()=>{try{let cn=E?.getServerCapabilities(),un=ie??{name:"MCP-UI Host",version:"1.0.0"},Tn=se??{openLinks:{},serverTools:cn?.tools,serverResources:cn?.resources},_n=new Mm(E??null,un,Tn);if(Wt=_n,_n.onmessage=async(sn,yn)=>{if(We.current)return We.current(sn,yn);else throw new Ls(Gi.MethodNotFound,"Method not found")},_n.onopenlink=async(sn,yn)=>{if(At.current)return At.current(sn,yn);else throw new Ls(Gi.MethodNotFound,"Method not found")},_n.onloggingmessage=(sn)=>{if(Et.current)Et.current(sn)},ye.current)_n.oncalltool=(sn,yn)=>ye.current(sn,yn);if(on.current)_n.onlistresources=(sn,yn)=>on.current(sn,yn);if(qt.current)_n.onlistresourcetemplates=(sn,yn)=>qt.current(sn,yn);if(ve.current)_n.onreadresource=(sn,yn)=>ve.current(sn,yn);if(tn.current)_n.onlistprompts=(sn,yn)=>tn.current(sn,yn);if(_n.fallbackRequestHandler=async(sn,yn)=>{if(nn.current)return nn.current(sn,yn);throw new Ls(Gi.MethodNotFound,`No handler for method: ${sn.method}`)},!Kt)return;Oe(_n)}catch(cn){if(console.error("[AppRenderer] Error creating bridge:",cn),!Kt)return;let un=cn instanceof Error?cn:Error(String(cn));_t(un),Ut.current?.(un)}})(),()=>{if(Kt=!1,Wt)Wt.close().catch((cn)=>{console.error("[AppRenderer] Error closing bridge:",cn)})}},[E,ie,se]),i(()=>{if(B){Nt(B);return}let Kt=!!E,Wt=!!w&&!!ve.current;if(!Kt&&!Wt){_t(Error("Either 'html' prop, 'client', or ('toolResourceUri' + 'onReadResource') must be provided to fetch UI resource"));return}let bn=!0;return(async()=>{try{let un;if(w)un=w,console.log(`[AppRenderer] Using provided resource URI: ${un}`);else if(E){console.log(`[AppRenderer] Fetching resource URI for tool: ${T}`);let _n=await UL(E,T);if(!_n)throw Error(`Tool ${T} has no UI resource (no ui/resourceUri in tool._meta)`);un=_n.uri,console.log(`[AppRenderer] Got resource URI: ${un}`)}else throw Error("Cannot determine resource URI without client or toolResourceUri");if(!bn)return;console.log(`[AppRenderer] Reading resource HTML from: ${un}`);let Tn;if(E)Tn=await FL(E,{uri:un});else if(ve.current){let _n=await ve.current({uri:un},{});if(!_n.contents||_n.contents.length!==1)throw Error("Unsupported UI resource content length: "+_n.contents?.length);let sn=_n.contents[0],yn=(Br)=>Br===ja;if("text"in sn&&typeof sn.text==="string"&&yn(sn.mimeType))Tn=sn.text;else if("blob"in sn&&typeof sn.blob==="string"&&yn(sn.mimeType))Tn=atob(sn.blob);else throw Error("Unsupported UI resource content format: "+JSON.stringify(sn))}else throw Error("No way to read resource HTML");if(!bn)return;Nt(Tn)}catch(un){if(!bn)return;let Tn=un instanceof Error?un:Error(String(un));_t(Tn),Ut.current?.(Tn)}})(),()=>{bn=!1}},[E,T,w,B]),i(()=>{if(ht&&re)ht.setHostContext(re)},[ht,re]),i(()=>{if(ht&&X)ht.sendToolInputPartial(X)},[ht,X]),i(()=>{if(ht&&ee)ht.sendToolCancelled({})},[ht,ee]);let $t=jt.current;if(mt)return Ds("div",{style:{color:"red",padding:"1rem"},children:["Error: ",mt.message]},void 0,!0,void 0,null);if(!ht||!Rt)return null;return Ds(HL,{html:Rt,sandbox:R,appBridge:ht,toolInput:Z,toolResult:K,onSizeChanged:$t,onError:Ae},void 0,!1,void 0,null)});C0.displayName="AppRenderer";var s1=({toolName:g,title:_,html:E,toolResourceUri:T,toolInput:R,toolResult:w,sandboxUrl:B,isExpandedDefault:Z=!1,className:K,onAction:X})=>{let[ee,re]=n(Z),[ie,se]=n(null),ae=o(null),fe=l(()=>({theme:typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",locale:typeof navigator<"u"?navigator.language:"en-US",displayMode:ee?"fullscreen":"inline"}),[ee]),xe=l(()=>({url:B?new URL(B):new URL("https://mcpui.dev/sandbox_proxy.html"),permissions:"allow-scripts allow-forms allow-same-origin"}),[B]);return t("div",{ref:ae,className:s("flex flex-col rounded-3xl border transition-all duration-300 overflow-hidden","bg-[var(--md-sys-color-surface-container-low,#f7f2fa)]","border-[var(--md-sys-color-outline-variant,#cac4d0)]","text-[var(--md-sys-color-on-surface,#1d1b20)]",ee?"fixed inset-4 z-50 shadow-2xl":"relative w-full shadow-sm",K),children:[t("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--md-sys-color-outline-variant,#cac4d0)]/40 bg-[var(--md-sys-color-surface-container,#f3edf7)]/60",children:[t("div",{className:"flex items-center gap-2.5",children:[e("div",{className:"flex h-7 w-7 items-center justify-center rounded-xl bg-[var(--md-sys-color-primary-container,#eaddff)] text-[var(--md-sys-color-on-primary-container,#21005d)]",children:e("span",{className:"material-symbols-outlined text-base",children:"widgets"})}),t("div",{className:"flex flex-col",children:[t("div",{className:"flex items-center gap-2",children:[e("span",{className:"text-xs font-semibold tracking-tight",children:_||g}),e("span",{className:"rounded-full bg-[var(--md-sys-color-surface-container-high,#ece6f0)] px-2 py-0.2 text-[10px] font-mono text-[var(--md-sys-color-on-surface-variant,#49454f)]",children:"mcp-ui"})]}),T&&e("span",{className:"text-[10px] font-mono text-[var(--md-sys-color-outline,#79747e)]",children:T})]})]}),t("div",{className:"flex items-center gap-1",children:[t("div",{className:"flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-700 dark:text-emerald-400",children:[e("span",{className:"material-symbols-outlined text-xs",children:"verified_user"}),e("span",{children:"Sandboxed"})]}),e("button",{type:"button",onClick:()=>re(!ee),title:ee?"Collapse":"Expand Fullscreen",className:"flex h-7 w-7 items-center justify-center rounded-lg text-[var(--md-sys-color-on-surface-variant,#49454f)] hover:bg-[var(--md-sys-color-surface-container-high,#ece6f0)] transition-colors",children:e("span",{className:"material-symbols-outlined text-base",children:ee?"close_fullscreen":"open_in_full"})})]})]}),e("div",{className:s("relative w-full overflow-hidden transition-all",ee?"flex-1 min-h-[500px]":"h-96"),children:ie?t("div",{className:"flex h-full flex-col items-center justify-center p-6 text-center text-xs text-[var(--md-sys-color-error,#b3261e)]",children:[e("span",{className:"material-symbols-outlined text-3xl mb-1",children:"error"}),e("span",{className:"font-semibold",children:"MCP App Render Error"}),e("p",{className:"mt-1 font-mono text-[11px] opacity-80",children:ie})]}):E?e(C0,{toolName:g,html:E,sandbox:xe,toolInput:R,toolResult:w,hostContext:fe,onError:(Ee)=>se(Ee.message)}):t("div",{className:"flex h-full flex-col items-center justify-center p-6 text-xs text-[var(--md-sys-color-outline,#79747e)]",children:[e("span",{className:"material-symbols-outlined text-2xl animate-spin mb-1 text-[var(--md-sys-color-primary,#6750a4)]",children:"progress_activity"}),t("span",{children:["Awaiting MCP UI Resource (",g,")..."]})]})}),R&&t("div",{className:"flex items-center justify-between px-4 py-2 border-t border-[var(--md-sys-color-outline-variant,#cac4d0)]/30 bg-[var(--md-sys-color-surface-container-lowest,#ffffff)] text-[10px] text-[var(--md-sys-color-outline,#79747e)] font-mono",children:[t("span",{className:"truncate",children:["input: ",JSON.stringify(R)]}),e("span",{className:"shrink-0 ml-2",children:"M3 UI Bridge"})]})]})};function Ga(g,_){for(let E of _){let T=g.args?.[E];if(T!==void 0&&T!==null)return T}return}var Fm=(g)=>(_)=>{if(_.title)return _.title;let E=Ga(_,g);return E?kr(String(E),60):null},l1=(g)=>g.resultRaw?e(VL,{text:kr(g.resultRaw,100)}):null;function a1(g){return{summary:Fm(g),argsView(_){let E=Ga(_,g);if(!E)return null;let T=_.args?.offset,R=_.args?.limit;return e("div",{className:"rounded-small bg-surface-container-highest px-3 py-2",children:t("p",{className:"font-code text-body-small text-on-surface-variant",children:[String(E),T?` (from line ${T})`:"",R?` (${R} lines)`:""]})})},resultView(_){if(!_.resultRaw)return null;return e(Xo,{text:_.resultRaw,maxLines:30})}}}function u1(g){return{summary:Fm(g),argsView(_){let E=Ga(_,g),T=_.args?.content;if(!E&&!T)return null;return t("div",{className:"rounded-small bg-surface-container-highest px-3 py-2",children:[!!E&&e("p",{className:"mb-1 font-code text-body-small text-on-surface-variant",children:String(E)}),!!T&&e("pre",{className:"max-h-40 overflow-auto font-code text-body-small text-outline",children:kr(String(T),2000)})]})},resultView:l1}}function c1(g,_,E){let T={error:"text-error",success:"text-success"},R=(w,B,Z)=>Z?t("div",{className:"mt-1",children:[e("p",{className:`text-body-small font-medium ${T[B]}`,children:w}),e("pre",{className:`max-h-20 overflow-auto font-code text-body-small ${T[B]}`,children:kr(String(Z),500)})]}):null;return{summary:Fm(g),argsView(w){let B=Ga(w,g);if(!B)return null;return t("div",{className:"rounded-small bg-surface-container-highest px-3 py-2",children:[e("p",{className:"mb-1 font-code text-body-small text-on-surface-variant",children:String(B)}),R("Old","error",Ga(w,_)),R("New","success",Ga(w,E))]})},resultView:l1}}var qL={file_read:a1(["path"]),file_write:u1(["path"]),file_edit:c1(["path"],["old_string"],["new_string"]),file_list:{summary:Fm(["path"]),resultView(g){if(!g.resultRaw)return null;return e(Xo,{text:g.resultRaw,maxLines:30})}},set_status:{summary(g){let _=g.args?.kind,E=g.args?.message;if(_==="outcome")return E?`Outcome: ${kr(String(E),50)}`:"Outcome set";return E?kr(String(E),60):null},resultView(){return null}},read:a1(["filePath","file_path"]),write:u1(["filePath","file_path"]),edit:c1(["filePath","file_path"],["oldString","old_string"],["newString","new_string"]),glob:{summary(g){if(g.title)return g.title;let _=g.args?.pattern;return _?kr(String(_),60):null},resultView(g){if(!g.resultRaw)return null;return e(Xo,{text:g.resultRaw,maxLines:20})}},grep:{summary(g){if(g.title)return g.title;let _=g.args?.pattern,E=g.args?.include;if(_&&E)return`/${_}/ in ${E}`;return _?`/${kr(String(_),40)}/`:null},resultView(g){if(!g.resultRaw)return null;return e(Xo,{text:g.resultRaw,maxLines:20})}},webfetch:{summary(g){if(g.title)return g.title;let _=g.args?.url;return _?kr(String(_),60):null},resultView(g){if(!g.resultRaw)return null;return e(Xo,{text:g.resultRaw,maxLines:20})}},read_skill:{summary(g){if(g.title)return g.title;let _=g.args?.name;return _?String(_):null},resultView(g){if(!g.resultRaw)return null;return e(Xo,{text:g.resultRaw,maxLines:30})}},web_search:{summary(g){if(g.title)return g.title;let _=g.args?.query,E=g.result?.result_count??(Array.isArray(g.result?.results)?g.result.results.length:null),T=_?kr(String(_),50):null;if(T&&E!=null)return`${T} (${E} result${E!==1?"s":""})`;return T},argsView(g){let _=g.args?.query;if(!_)return null;let E=g.args?.count,T=g.args?.freshness;return t("div",{className:"rounded-small bg-surface-container-highest px-3 py-2",children:[t("p",{className:"text-body-small text-on-surface-variant",children:[e("span",{className:"select-none text-outline",children:"Search: "}),String(_)]}),!!(E||T)&&t("p",{className:"mt-0.5 text-body-small text-outline",children:[E?`${E} results`:"",E&&T?" · ":"",T?`${T}`:""]})]})},resultView(g){if(!g.resultRaw)return null;return e(Xo,{text:g.resultRaw,maxLines:20})}},spacebot_docs:{summary(g){if(g.title)return g.title;let _=g.args?.action,E=g.args?.doc_id;if(_==="read"&&E)return kr(String(E),50);return _?String(_):"list"},argsView(g){let _=g.args?.action,E=g.args?.doc_id,T=g.args?.query;if(!_&&!E)return null;return t("div",{className:"rounded-small bg-surface-container-highest px-3 py-2",children:[!!E&&e("p",{className:"font-code text-body-small text-on-surface-variant",children:String(E)}),!!T&&t("p",{className:"mt-0.5 text-body-small text-outline",children:["filter: ",String(T)]})]})},resultView(g){if(!g.resultRaw)return null;return e(Xo,{text:g.resultRaw,maxLines:30})}},todowrite:{summary(g){if(g.title)return g.title;return"Update tasks"},resultView(){return null}},task:{summary(g){if(g.title)return g.title;let _=g.args?.description;return _?kr(String(_),60):null},resultView(g){if(!g.resultRaw)return null;return e(Xo,{text:g.resultRaw,maxLines:20})}}},jL={summary(g){if(!g.argsRaw||g.argsRaw==="{}")return null;return kr(g.argsRaw,60)}};function ZL(g){return qL[g]??jL}function VL({text:g}){return e("p",{className:"px-3 py-2 text-body-small text-on-surface-variant",children:g})}function Xo({text:g,maxLines:_=20}){let[E,T]=n(!1),R=g.split(`
|
|
101
|
+
`),w=R.length>_,B=w&&!E?R.slice(0,_).join(`
|
|
102
|
+
`)+`
|
|
103
|
+
...`:g;return t("div",{children:[e("pre",{className:"max-h-80 overflow-auto whitespace-pre-wrap px-3 py-2 font-code text-body-small text-on-surface-variant",children:B}),w&&t("button",{type:"button",onClick:()=>T(!E),className:s("flex h-8 w-full items-center justify-center gap-1 border-t border-outline-variant px-3 text-label-medium text-primary","transition-colors duration-200 ease-standard hover:bg-primary/8 active:bg-primary/10",ci),children:[e(x,{name:"expand_more",size:18,className:s("transition-transform duration-200 ease-standard",E&&"rotate-180")}),E?"Show less":`Show all ${R.length} lines`]})]})}var GL={running:"pending",completed:"check_circle",error:"error"},YL={running:"text-primary",completed:"text-success",error:"text-error"},WL={running:"Running",completed:"Completed",error:"Error"};function KL(g){if(g.startsWith("file_")||g==="read"||g==="write"||g==="edit")return"description";if(g==="glob"||g==="grep"||g==="web_search")return"search";if(g==="webfetch")return"language";if(g==="set_status")return"schedule";return"build"}function JL(g){let _={webfetch:"Web Fetch",todowrite:"Todo",read_skill:"Read Skill",web_search:"Web Search",spacebot_docs:"Docs"};if(_[g])return _[g];return g.replace(/^file_/,"").split("_").map((T)=>T.charAt(0).toUpperCase()+T.slice(1)).join(" ")}function XL(g){if(g.startsWith("file_"))return"File";return null}function w0({pair:g,defaultExpanded:_=!1,className:E}){let[T,R]=n(_),w=j(),B=ZL(g.name),Z=B.summary(g),K=XL(g.name),X=JL(g.name),ee=g.status==="error",re=T?QL(g,B):null,ie=T?e4(g,B):null;return t("div",{"data-status":g.status,className:s("m3-tool-call min-w-0 overflow-hidden rounded-medium border bg-surface-container-low text-on-surface",ee?"border-error":"border-outline-variant",E),children:[t("button",{type:"button",onClick:()=>R(!T),"aria-expanded":T,"aria-controls":w,className:s("flex min-h-10 w-full items-center gap-2 rounded-medium px-3 py-2 text-left","transition-colors duration-200 ease-standard hover:bg-on-surface/8 active:bg-on-surface/10",ci),children:[e("span",{className:s("flex size-5 shrink-0 items-center justify-center",YL[g.status]),children:g.status==="running"?e(Kg,{size:16,label:"Running"}):e(x,{name:GL[g.status],size:18,filled:!0,label:WL[g.status]})}),e(x,{name:KL(g.name),size:18,className:"shrink-0 text-on-surface-variant"}),K&&e("span",{className:"text-label-medium text-outline",children:K}),e("span",{className:"shrink-0 text-label-large text-on-surface",children:X}),Z&&!T?e("span",{className:"min-w-0 flex-1 truncate text-body-small text-on-surface-variant",children:Z}):e("span",{className:"flex-1"}),ee&&e(Ex,{tone:"error",className:"h-5 px-1.5 text-label-small",children:"error"}),e(x,{name:"expand_more",size:20,className:s("shrink-0 text-on-surface-variant transition-transform duration-300 ease-emphasized",T&&"rotate-180")})]}),e(le,{initial:!1,children:T?e(V.div,{id:w,..._x,className:"overflow-hidden",children:t("div",{className:"flex flex-col gap-2 border-t border-outline-variant px-3 py-3",children:[re,ie!=null&&ie!==!1?e("div",{className:s("m3-tool-result overflow-hidden rounded-small",ee?"bg-error-container text-on-error-container [&_.text-on-surface-variant]:text-on-error-container [&_.text-outline]:text-on-error-container/80":"bg-surface-container-highest text-on-surface-variant"),children:ie}):null]})},"body"):null})]})}function QL(g,_){if(_.argsView){let E=_.argsView(g);if(E)return E}if(g.args&&Object.keys(g.args).length>0)return e("div",{className:"rounded-small bg-surface-container-highest px-3 py-2",children:e("div",{className:"flex flex-col gap-0.5",children:Object.entries(g.args).map(([E,T])=>t("p",{className:"font-code text-body-small",children:[t("span",{className:"text-outline",children:[E,": "]}),e("span",{className:"text-on-surface-variant",children:t4(E,T)})]},E))})});if(g.argsRaw&&g.argsRaw!=="{}"&&g.argsRaw.trim().length>0)return e("div",{className:"rounded-small bg-surface-container-highest px-3 py-2",children:e("pre",{className:"max-h-40 overflow-auto font-code text-body-small text-on-surface-variant",children:g.argsRaw})});return null}function e4(g,_){if(g.status==="running")return t("div",{className:"flex items-center gap-2 px-3 py-2 text-body-small text-on-surface-variant",children:[e(Kg,{size:14,label:"Running"}),"Running..."]});if(_.resultView){let R=_.resultView(g);if(R!==void 0)return R}if(!g.resultRaw)return null;let E=g.result?._meta?.ui?.resourceUri||g.result?.ui?.resourceUri,T=g.result?.html||g.result?.uiHtml;if(E||T)return e("div",{className:"p-1",children:e(s1,{toolName:g.name,title:g.title||g.name,html:typeof T==="string"?T:void 0,toolResourceUri:typeof E==="string"?E:void 0,toolInput:g.args||void 0,toolResult:g.result||void 0})});if(g.result&&Object.keys(g.result).length>0)return e("div",{className:"px-3 py-2",children:e("div",{className:"flex flex-col gap-0.5",children:Object.entries(g.result).map(([R,w])=>t("p",{className:"font-code text-body-small",children:[t("span",{className:"text-outline",children:[R,": "]}),e("span",{className:"text-on-surface-variant",children:typeof w==="string"?kr(w,200):JSON.stringify(w)})]},R))})});return e(Xo,{text:g.resultRaw,maxLines:20})}function t4(g,_){if(g==="secret"&&typeof _==="string")return"***";if(typeof _==="string")return kr(_,100);if(typeof _==="boolean"||typeof _==="number")return String(_);return JSON.stringify(_)}function kr(g,_){if(g.length<=_)return g;return g.slice(0,_)+"..."}r();function gn(){}function Bm(){}function A0(g){let _=[],E=String(g||""),T=E.indexOf(","),R=0,w=!1;while(!w){if(T===-1)T=E.length,w=!0;let B=E.slice(R,T).trim();if(B||!w)_.push(B);R=T+1,T=E.indexOf(",",R)}return _}function Hm(g,_){let E=_||{};return(g[g.length-1]===""?[...g,""]:g).join((E.padRight?" ":"")+","+(E.padLeft===!1?"":" ")).trim()}var n4=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,r4=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,o4={};function qm(g,_){return((_||o4).jsx?r4:n4).test(g)}var i4=/[ \t\n\f\r]/g;function P0(g){return typeof g==="object"?g.type==="text"?d1(g.value):!1:d1(g)}function d1(g){return g.replace(i4,"")===""}class Yi{constructor(g,_,E){if(this.normal=_,this.property=g,E)this.space=E}}Yi.prototype.normal={};Yi.prototype.property={};Yi.prototype.space=void 0;function z0(g,_){let E={},T={};for(let R of g)Object.assign(E,R.property),Object.assign(T,R.normal);return new Yi(E,T,_)}function gi(g){return g.toLowerCase()}class lr{constructor(g,_){this.attribute=_,this.property=g}}lr.prototype.attribute="";lr.prototype.booleanish=!1;lr.prototype.boolean=!1;lr.prototype.commaOrSpaceSeparated=!1;lr.prototype.commaSeparated=!1;lr.prototype.defined=!1;lr.prototype.mustUseProperty=!1;lr.prototype.number=!1;lr.prototype.overloadedBoolean=!1;lr.prototype.property="";lr.prototype.spaceSeparated=!1;lr.prototype.space=void 0;var sd={};Ze(sd,{boolean:()=>Xt,booleanish:()=>Fn,commaOrSpaceSeparated:()=>Ur,commaSeparated:()=>bi,number:()=>rt,overloadedBoolean:()=>jm,spaceSeparated:()=>En});var s4=0,Xt=$s(),Fn=$s(),jm=$s(),rt=$s(),En=$s(),bi=$s(),Ur=$s();function $s(){return 2**++s4}var N0=Object.keys(sd);class Ya extends lr{constructor(g,_,E,T){let R=-1;super(g,_);if(p1(this,"space",T),typeof E==="number")while(++R<N0.length){let w=N0[R];p1(this,N0[R],(E&sd[w])===sd[w])}}}Ya.prototype.defined=!0;function p1(g,_,E){if(E)g[_]=E}function go(g){let _={},E={};for(let[T,R]of Object.entries(g.properties)){let w=new Ya(T,g.transform(g.attributes||{},T),R,g.space);if(g.mustUseProperty&&g.mustUseProperty.includes(T))w.mustUseProperty=!0;_[T]=w,E[gi(T)]=T,E[gi(w.attribute)]=T}return new Yi(_,E,g.space)}var O0=go({properties:{ariaActiveDescendant:null,ariaAtomic:Fn,ariaAutoComplete:null,ariaBusy:Fn,ariaChecked:Fn,ariaColCount:rt,ariaColIndex:rt,ariaColSpan:rt,ariaControls:En,ariaCurrent:null,ariaDescribedBy:En,ariaDetails:null,ariaDisabled:Fn,ariaDropEffect:En,ariaErrorMessage:null,ariaExpanded:Fn,ariaFlowTo:En,ariaGrabbed:Fn,ariaHasPopup:null,ariaHidden:Fn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:En,ariaLevel:rt,ariaLive:null,ariaModal:Fn,ariaMultiLine:Fn,ariaMultiSelectable:Fn,ariaOrientation:null,ariaOwns:En,ariaPlaceholder:null,ariaPosInSet:rt,ariaPressed:Fn,ariaReadOnly:Fn,ariaRelevant:null,ariaRequired:Fn,ariaRoleDescription:En,ariaRowCount:rt,ariaRowIndex:rt,ariaRowSpan:rt,ariaSelected:Fn,ariaSetSize:rt,ariaSort:null,ariaValueMax:rt,ariaValueMin:rt,ariaValueNow:rt,ariaValueText:null,role:null},transform(g,_){return _==="role"?_:"aria-"+_.slice(4).toLowerCase()}});function Zm(g,_){return _ in g?g[_]:_}function Vm(g,_){return Zm(g,_.toLowerCase())}var m1=go({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:bi,acceptCharset:En,accessKey:En,action:null,allow:null,allowFullScreen:Xt,allowPaymentRequest:Xt,allowUserMedia:Xt,alpha:Xt,alt:null,as:null,async:Xt,autoCapitalize:null,autoComplete:En,autoFocus:Xt,autoPlay:Xt,blocking:En,capture:null,charSet:null,checked:Xt,cite:null,className:En,closedBy:null,colorSpace:null,cols:rt,colSpan:rt,command:null,commandFor:null,content:null,contentEditable:Fn,controls:Xt,controlsList:En,coords:rt|bi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Xt,defer:Xt,dir:null,dirName:null,disabled:Xt,download:jm,draggable:Fn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Xt,formTarget:null,headers:En,height:rt,hidden:jm,high:rt,href:null,hrefLang:null,htmlFor:En,httpEquiv:En,id:null,imageSizes:null,imageSrcSet:null,inert:Xt,inputMode:null,integrity:null,is:null,isMap:Xt,itemId:null,itemProp:En,itemRef:En,itemScope:Xt,itemType:En,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Xt,low:rt,manifest:null,max:null,maxLength:rt,media:null,method:null,min:null,minLength:rt,multiple:Xt,muted:Xt,name:null,nonce:null,noModule:Xt,noValidate:Xt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Xt,optimum:rt,pattern:null,ping:En,placeholder:null,playsInline:Xt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Xt,referrerPolicy:null,rel:En,required:Xt,reversed:Xt,rows:rt,rowSpan:rt,sandbox:En,scope:null,scoped:Xt,seamless:Xt,selected:Xt,shadowRootClonable:Xt,shadowRootCustomElementRegistry:Xt,shadowRootDelegatesFocus:Xt,shadowRootMode:null,shadowRootSerializable:Xt,shape:null,size:rt,sizes:null,slot:null,span:rt,spellCheck:Fn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:rt,step:null,style:null,tabIndex:rt,target:null,title:null,translate:null,type:null,typeMustMatch:Xt,useMap:null,value:Fn,width:rt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:En,axis:null,background:null,bgColor:null,border:rt,borderColor:null,bottomMargin:rt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Xt,declare:Xt,event:null,face:null,frame:null,frameBorder:null,hSpace:rt,leftMargin:rt,link:null,longDesc:null,lowSrc:null,marginHeight:rt,marginWidth:rt,noResize:Xt,noHref:Xt,noShade:Xt,noWrap:Xt,object:null,profile:null,prompt:null,rev:null,rightMargin:rt,rules:null,scheme:null,scrolling:Fn,standby:null,summary:null,text:null,topMargin:rt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:rt,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Xt,disablePictureInPicture:Xt,disableRemotePlayback:Xt,exportParts:bi,part:En,prefix:null,property:null,results:rt,security:null,unselectable:null},space:"html",transform:Vm});var f1=go({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ur,accentHeight:rt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:rt,amplitude:rt,arabicForm:null,ascent:rt,attributeName:null,attributeType:null,azimuth:rt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:rt,by:null,calcMode:null,capHeight:rt,className:En,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:rt,diffuseConstant:rt,direction:null,display:null,dur:null,divisor:rt,dominantBaseline:null,download:Xt,dx:null,dy:null,edgeMode:null,editable:null,elevation:rt,enableBackground:null,end:null,event:null,exponent:rt,externalResourcesRequired:null,fill:null,fillOpacity:rt,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:bi,g2:bi,glyphName:bi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:rt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:rt,horizOriginX:rt,horizOriginY:rt,id:null,ideographic:rt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:rt,k:rt,k1:rt,k2:rt,k3:rt,k4:rt,kernelMatrix:Ur,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:rt,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:rt,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:rt,overlineThickness:rt,paintOrder:null,panose1:null,path:null,pathLength:rt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:En,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:rt,pointsAtY:rt,pointsAtZ:rt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ur,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ur,rev:Ur,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ur,requiredFeatures:Ur,requiredFonts:Ur,requiredFormats:Ur,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:rt,specularExponent:rt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:rt,strikethroughThickness:rt,string:null,stroke:null,strokeDashArray:Ur,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:rt,strokeOpacity:rt,strokeWidth:null,style:null,surfaceScale:rt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ur,tabIndex:rt,tableValues:null,target:null,targetX:rt,targetY:rt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ur,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:rt,underlineThickness:rt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:rt,values:null,vAlphabetic:rt,vMathematical:rt,vectorEffect:null,vHanging:rt,vIdeographic:rt,version:null,vertAdvY:rt,vertOriginX:rt,vertOriginY:rt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:rt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zm});var M0=go({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(g,_){return"xlink:"+_.slice(5).toLowerCase()}});var L0=go({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Vm});var D0=go({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(g,_){return"xml:"+_.slice(3).toLowerCase()}});var $0={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var a4=/[A-Z]/g,h1=/-[a-z]/g,u4=/^data[-\w.:]+$/i;function Si(g,_){let E=gi(_),T=_,R=lr;if(E in g.normal)return g.property[g.normal[E]];if(E.length>4&&E.slice(0,4)==="data"&&u4.test(_)){if(_.charAt(4)==="-"){let w=_.slice(5).replace(h1,l4);T="data"+w.charAt(0).toUpperCase()+w.slice(1)}else{let w=_.slice(4);if(!h1.test(w)){let B=w.replace(a4,c4);if(B.charAt(0)!=="-")B="-"+B;_="data"+B}}R=Ya}return new R(T,_)}function c4(g){return"-"+g.toLowerCase()}function l4(g){return g.charAt(1).toUpperCase()}var _i=z0([O0,m1,M0,L0,D0],"html"),bo=z0([O0,f1,M0,L0,D0],"svg");function U0(g){let _=String(g||"").trim();return _?_.split(/[ \t\n\r\f]+/g):[]}function Gm(g){return g.join(" ").trim()}var z1=dt(C1(),1);var Fs=w1("end"),Fr=w1("start");function w1(g){return _;function _(E){let T=E&&E.position&&E.position[g]||{};if(typeof T.line==="number"&&T.line>0&&typeof T.column==="number"&&T.column>0)return{line:T.line,column:T.column,offset:typeof T.offset==="number"&&T.offset>-1?T.offset:void 0}}}function H0(g){let _=Fr(g),E=Fs(g);if(_&&E)return{start:_,end:E}}function Wi(g){if(!g||typeof g!=="object")return"";if("position"in g||"type"in g)return A1(g.position);if("start"in g||"end"in g)return A1(g);if("line"in g||"column"in g)return q0(g);return""}function q0(g){return P1(g&&g.line)+":"+P1(g&&g.column)}function A1(g){return q0(g&&g.start)+"-"+q0(g&&g.end)}function P1(g){return g&&typeof g==="number"?g:1}class Vn extends Error{constructor(g,_,E){super();if(typeof _==="string")E=_,_=void 0;let T="",R={},w=!1;if(_)if("line"in _&&"column"in _)R={place:_};else if("start"in _&&"end"in _)R={place:_};else if("type"in _)R={ancestors:[_],place:_.position};else R={..._};if(typeof g==="string")T=g;else if(!R.cause&&g)w=!0,T=g.message,R.cause=g;if(!R.ruleId&&!R.source&&typeof E==="string"){let Z=E.indexOf(":");if(Z===-1)R.ruleId=E;else R.source=E.slice(0,Z),R.ruleId=E.slice(Z+1)}if(!R.place&&R.ancestors&&R.ancestors){let Z=R.ancestors[R.ancestors.length-1];if(Z)R.place=Z.position}let B=R.place&&"start"in R.place?R.place.start:R.place;this.ancestors=R.ancestors||void 0,this.cause=R.cause||void 0,this.column=B?B.column:void 0,this.fatal=void 0,this.file="",this.message=T,this.line=B?B.line:void 0,this.name=Wi(R.place)||"1:1",this.place=R.place||void 0,this.reason=this.message,this.ruleId=R.ruleId||void 0,this.source=R.source||void 0,this.stack=w&&R.cause&&typeof R.cause.stack==="string"?R.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Vn.prototype.file="";Vn.prototype.name="";Vn.prototype.reason="";Vn.prototype.message="";Vn.prototype.stack="";Vn.prototype.column=void 0;Vn.prototype.line=void 0;Vn.prototype.ancestors=void 0;Vn.prototype.cause=void 0;Vn.prototype.fatal=void 0;Vn.prototype.place=void 0;Vn.prototype.ruleId=void 0;Vn.prototype.source=void 0;var j0={}.hasOwnProperty,L4=new Map,D4=/[A-Z]/g,$4=new Set(["table","tbody","thead","tfoot","tr"]),U4=new Set(["td","th"]),N1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Z0(g,_){if(!_||_.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let E=_.filePath||void 0,T;if(_.development){if(typeof _.jsxDEV!=="function")throw TypeError("Expected `jsxDEV` in options when `development: true`");T=G4(E,_.jsxDEV)}else{if(typeof _.jsx!=="function")throw TypeError("Expected `jsx` in production options");if(typeof _.jsxs!=="function")throw TypeError("Expected `jsxs` in production options");T=V4(E,_.jsx,_.jsxs)}let R={Fragment:_.Fragment,ancestors:[],components:_.components||{},create:T,elementAttributeNameCase:_.elementAttributeNameCase||"react",evaluater:_.createEvaluater?_.createEvaluater():void 0,filePath:E,ignoreInvalidStyle:_.ignoreInvalidStyle||!1,passKeys:_.passKeys!==!1,passNode:_.passNode||!1,schema:_.space==="svg"?bo:_i,stylePropertyNameCase:_.stylePropertyNameCase||"dom",tableCellAlignToStyle:_.tableCellAlignToStyle!==!1},w=O1(R,g,void 0);if(w&&typeof w!=="string")return w;return R.create(g,R.Fragment,{children:w||void 0},void 0)}function O1(g,_,E){if(_.type==="element")return F4(g,_,E);if(_.type==="mdxFlowExpression"||_.type==="mdxTextExpression")return B4(g,_);if(_.type==="mdxJsxFlowElement"||_.type==="mdxJsxTextElement")return q4(g,_,E);if(_.type==="mdxjsEsm")return H4(g,_);if(_.type==="root")return j4(g,_,E);if(_.type==="text")return Z4(g,_)}function F4(g,_,E){let T=g.schema,R=T;if(_.tagName.toLowerCase()==="svg"&&T.space==="html")R=bo,g.schema=R;g.ancestors.push(_);let w=L1(g,_.tagName,!1),B=Y4(g,_),Z=G0(g,_);if($4.has(_.tagName))Z=Z.filter(function(K){return typeof K==="string"?!P0(K):!0});return M1(g,B,w,_),V0(B,Z),g.ancestors.pop(),g.schema=T,g.create(_,w,B,E)}function B4(g,_){if(_.data&&_.data.estree&&g.evaluater){let T=_.data.estree.body[0];return gn(T.type==="ExpressionStatement"),g.evaluater.evaluateExpression(T.expression)}ud(g,_.position)}function H4(g,_){if(_.data&&_.data.estree&&g.evaluater)return g.evaluater.evaluateProgram(_.data.estree);ud(g,_.position)}function q4(g,_,E){let T=g.schema,R=T;if(_.name==="svg"&&T.space==="html")R=bo,g.schema=R;g.ancestors.push(_);let w=_.name===null?g.Fragment:L1(g,_.name,!0),B=W4(g,_),Z=G0(g,_);return M1(g,B,w,_),V0(B,Z),g.ancestors.pop(),g.schema=T,g.create(_,w,B,E)}function j4(g,_,E){let T={};return V0(T,G0(g,_)),g.create(_,g.Fragment,T,E)}function Z4(g,_){return _.value}function M1(g,_,E,T){if(typeof E!=="string"&&E!==g.Fragment&&g.passNode)_.node=T}function V0(g,_){if(_.length>0){let E=_.length>1?_:_[0];if(E)g.children=E}}function V4(g,_,E){return T;function T(R,w,B,Z){let X=Array.isArray(B.children)?E:_;return Z?X(w,B,Z):X(w,B)}}function G4(g,_){return E;function E(T,R,w,B){let Z=Array.isArray(w.children),K=Fr(T);return _(R,w,B,Z,{columnNumber:K?K.column-1:void 0,fileName:g,lineNumber:K?K.line:void 0},void 0)}}function Y4(g,_){let E={},T,R;for(R in _.properties)if(R!=="children"&&j0.call(_.properties,R)){let w=K4(g,R,_.properties[R]);if(w){let[B,Z]=w;if(g.tableCellAlignToStyle&&B==="align"&&typeof Z==="string"&&U4.has(_.tagName))T=Z;else E[B]=Z}}if(T){let w=E.style||(E.style={});w[g.stylePropertyNameCase==="css"?"text-align":"textAlign"]=T}return E}function W4(g,_){let E={};for(let T of _.attributes)if(T.type==="mdxJsxExpressionAttribute")if(T.data&&T.data.estree&&g.evaluater){let w=T.data.estree.body[0];gn(w.type==="ExpressionStatement");let B=w.expression;gn(B.type==="ObjectExpression");let Z=B.properties[0];gn(Z.type==="SpreadElement"),Object.assign(E,g.evaluater.evaluateExpression(Z.argument))}else ud(g,_.position);else{let R=T.name,w;if(T.value&&typeof T.value==="object")if(T.value.data&&T.value.data.estree&&g.evaluater){let Z=T.value.data.estree.body[0];gn(Z.type==="ExpressionStatement"),w=g.evaluater.evaluateExpression(Z.expression)}else ud(g,_.position);else w=T.value===null?!0:T.value;E[R]=w}return E}function G0(g,_){let E=[],T=-1,R=g.passKeys?new Map:L4;while(++T<_.children.length){let w=_.children[T],B;if(g.passKeys){let K=w.type==="element"?w.tagName:w.type==="mdxJsxFlowElement"||w.type==="mdxJsxTextElement"?w.name:void 0;if(K){let X=R.get(K)||0;B=K+"-"+X,R.set(K,X+1)}}let Z=O1(g,w,B);if(Z!==void 0)E.push(Z)}return E}function K4(g,_,E){let T=Si(g.schema,_);if(E===null||E===void 0||typeof E==="number"&&Number.isNaN(E))return;if(Array.isArray(E))E=T.commaSeparated?Hm(E):Gm(E);if(T.property==="style"){let R=typeof E==="object"?E:J4(g,String(E));if(g.stylePropertyNameCase==="css")R=X4(R);return["style",R]}return[g.elementAttributeNameCase==="react"&&T.space?$0[T.property]||T.property:T.attribute,E]}function J4(g,_){try{return z1.default(_,{reactCompat:!0})}catch(E){if(g.ignoreInvalidStyle)return{};let T=E,R=new Vn("Cannot parse `style` attribute",{ancestors:g.ancestors,cause:T,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw R.file=g.filePath||void 0,R.url=N1+"#cannot-parse-style-attribute",R}}function L1(g,_,E){let T;if(!E)T={type:"Literal",value:_};else if(_.includes(".")){let R=_.split("."),w=-1,B;while(++w<R.length){let Z=qm(R[w])?{type:"Identifier",name:R[w]}:{type:"Literal",value:R[w]};B=B?{type:"MemberExpression",object:B,property:Z,computed:Boolean(w&&Z.type==="Literal"),optional:!1}:Z}gn(B,"always a result"),T=B}else T=qm(_)&&!/^[a-z]/.test(_)?{type:"Identifier",name:_}:{type:"Literal",value:_};if(T.type==="Literal"){let R=T.value;return j0.call(g.components,R)?g.components[R]:R}if(g.evaluater)return g.evaluater.evaluateExpression(T);ud(g)}function ud(g,_){let E=new Vn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:g.ancestors,place:_,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw E.file=g.filePath||void 0,E.url=N1+"#cannot-handle-mdx-estrees-without-createevaluater",E}function X4(g){let _={},E;for(E in g)if(j0.call(g,E))_[Q4(E)]=g[E];return _}function Q4(g){let _=g.replace(D4,eD);if(_.slice(0,3)==="ms-")_="-"+_;return _}function eD(g){return"-"+g.toLowerCase()}var cd={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};r();var tD={};function Bs(g,_){let E=_||tD,T=typeof E.includeImageAlt==="boolean"?E.includeImageAlt:!0,R=typeof E.includeHtml==="boolean"?E.includeHtml:!0;return $1(g,T,R)}function $1(g,_,E){if(nD(g)){if("value"in g)return g.type==="html"&&!E?"":g.value;if(_&&"alt"in g&&g.alt)return g.alt;if("children"in g)return D1(g.children,_,E)}if(Array.isArray(g))return D1(g,_,E);return""}function D1(g,_,E){let T=[],R=-1;while(++R<g.length)T[R]=$1(g[R],_,E);return T.join("")}function nD(g){return Boolean(g&&typeof g==="object")}var U1=document.createElement("i");function Wa(g){let _="&"+g+";";U1.innerHTML=_;let E=U1.textContent;if(E.charCodeAt(E.length-1)===59&&g!=="semi")return!1;return E===_?!1:E}function er(g,_,E,T){let R=g.length,w=0,B;if(_<0)_=-_>R?0:R+_;else _=_>R?R:_;if(E=E>0?E:0,T.length<1e4)B=Array.from(T),B.unshift(_,E),g.splice(...B);else{if(E)g.splice(_,E);while(w<T.length)B=T.slice(w,w+1e4),B.unshift(_,0),g.splice(...B),w+=1e4,_+=1e4}}function Cr(g,_){if(g.length>0)return er(g,g.length,0,_),g;return _}var F1={}.hasOwnProperty;function Ym(g){let _={},E=-1;while(++E<g.length)rD(_,g[E]);return _}function rD(g,_){let E;for(E in _){let R=(F1.call(g,E)?g[E]:void 0)||(g[E]={}),w=_[E],B;if(w)for(B in w){if(!F1.call(R,B))R[B]=[];let Z=w[B];oD(R[B],Array.isArray(Z)?Z:Z?[Z]:[])}}}function oD(g,_){let E=-1,T=[];while(++E<_.length)(_[E].add==="after"?g:T).push(_[E]);er(g,0,0,T)}function Wm(g,_){let E=Number.parseInt(g,_);if(E<9||E===11||E>13&&E<32||E>126&&E<160||E>55295&&E<57344||E>64975&&E<65008||(E&65535)===65535||(E&65535)===65534||E>1114111)return"�";return String.fromCodePoint(E)}function br(g){return g.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Yn=Ki(/[A-Za-z]/),Bn=Ki(/[\dA-Za-z]/),B1=Ki(/[#-'*+\--9=?A-Z^-~]/);function Hs(g){return g!==null&&(g<32||g===127)}var ld=Ki(/\d/),H1=Ki(/[\dA-Fa-f]/),q1=Ki(/[!-/:-@[-`{-~]/);function vt(g){return g!==null&&g<-2}function dn(g){return g!==null&&(g<0||g===32)}function Ht(g){return g===-2||g===-1||g===32}var qs=Ki(/\p{P}|\p{S}/u),Qo=Ki(/\s/);function Ki(g){return _;function _(E){return E!==null&&E>-1&&g.test(String.fromCharCode(E))}}function So(g){let _=[],E=-1,T=0,R=0;while(++E<g.length){let w=g.charCodeAt(E),B="";if(w===37&&Bn(g.charCodeAt(E+1))&&Bn(g.charCodeAt(E+2)))R=2;else if(w<128){if(!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(w)))B=String.fromCharCode(w)}else if(w>55295&&w<57344){let Z=g.charCodeAt(E+1);if(w<56320&&Z>56319&&Z<57344)B=String.fromCharCode(w,Z),R=1;else B="�"}else B=String.fromCharCode(w);if(B)_.push(g.slice(T,E),encodeURIComponent(B)),T=E+R+1,B="";if(R)E+=R,R=0}return _.join("")+g.slice(T)}function Zt(g,_,E,T){let R=T?T-1:1/0,w=0;return B;function B(K){if(Ht(K))return g.enter(E),Z(K);return _(K)}function Z(K){if(Ht(K)&&w++<R)return g.consume(K),Z;return g.exit(E),_(K)}}function Y0(g,_,E,T,R,w){let B=0;return Z;function Z(ee){if(w>0&&Ht(ee))return g.enter(T),K(ee);return X(ee)}function K(ee){if(Ht(ee)&&B<w)return g.consume(ee),B++,K;return g.exit(T),X(ee)}function X(ee){return B>=R?_(ee):E(ee)}}var j1={tokenize:iD};function iD(g){let _=g.attempt(this.parser.constructs.contentInitial,T,R),E;return _;function T(Z){if(Z===null){g.consume(Z);return}return g.enter("lineEnding"),g.consume(Z),g.exit("lineEnding"),Zt(g,_,"linePrefix")}function R(Z){return g.enter("paragraph"),w(Z)}function w(Z){let K=g.enter("chunkText",{contentType:"text",previous:E});if(E)E.next=K;return E=K,B(Z)}function B(Z){if(Z===null){g.exit("chunkText"),g.exit("paragraph"),g.consume(Z);return}if(vt(Z))return g.consume(Z),g.exit("chunkText"),w;return g.consume(Z),B}}class Ji{constructor(){this.index=new Map,this.map=[]}add(g,_,E){Z1(this,g,_,E,!1)}addBefore(g,_,E){Z1(this,g,_,E,!0)}consume(g){if(this.map.sort(function(R,w){return R[0]-w[0]}),this.map.length===0)return;let _=this.map.length,E=[];while(_>0)_-=1,E.push(g.slice(this.map[_][0]+this.map[_][1]),this.map[_][2]),g.length=this.map[_][0];E.push(g.slice()),g.length=0;let T=E.pop();while(T){for(let R of T)g.push(R);T=E.pop()}this.map.length=0,this.index.clear()}}function Z1(g,_,E,T,R){if(E===0&&T.length===0)return;let w=g.index.get(_);if(w){if(w[1]+=E,R)T.push(...w[2]),w[2]=T;else w[2].push(...T);return}let B=[_,E,T];g.map.push(B),g.index.set(_,B)}var G1={tokenize:sD},V1={tokenize:aD};function sD(g){let _=this,E=[],T=0,R,w,B;return Z;function Z(Re){if(T<E.length){let Ve=E[T];return _.containerState=Ve[1],g.attempt(Ve[0].continuation,K,X)(Re)}return X(Re)}function K(Re){if(T++,_.containerState._closeFlow){if(_.containerState._closeFlow=void 0,R)Ae();let Ve=_.events.length,Ge=Ve,ke;while(Ge--)if(_.events[Ge][0]==="exit"&&_.events[Ge][1].type==="chunkFlow"){ke=_.events[Ge][1].end;break}Ee(T);let qe=Ve;while(qe<_.events.length)_.events[qe][1].end={...ke},qe++;let pt=new Ji;return pt.add(Ge+1,0,_.events.slice(Ve)),pt.add(Ve,qe-Ve,[]),pt.consume(_.events),X(Re)}return Z(Re)}function X(Re){if(T===E.length){if(!R)return ie(Re);if(R.currentConstruct&&R.currentConstruct.concrete)return ae(Re);_.interrupt=Boolean(R.currentConstruct&&!R._gfmTableDynamicInterruptHack)}return _.containerState={},g.check(V1,ee,re)(Re)}function ee(Re){if(R)Ae();return Ee(T),ie(Re)}function re(Re){return _.parser.lazy[_.now().line]=T!==E.length,B=_.now().offset,ae(Re)}function ie(Re){return _.containerState={},g.attempt(V1,se,ae)(Re)}function se(Re){return T++,E.push([_.currentConstruct,_.containerState]),ie(Re)}function ae(Re){if(Re===null){if(R)Ae();Ee(0),g.consume(Re);return}return R=R||_.parser.flow(_.now()),g.enter("chunkFlow",{_tokenizer:R,contentType:"flow",previous:w}),fe(Re)}function fe(Re){if(Re===null){xe(g.exit("chunkFlow"),!0),Ee(0),g.consume(Re);return}if(vt(Re))return g.consume(Re),xe(g.exit("chunkFlow")),T=0,_.interrupt=void 0,Z;return g.consume(Re),fe}function xe(Re,Ve){let Ge=_.sliceStream(Re);if(Ve)Ge.push(null);if(Re.previous=w,w)w.next=Re;if(w=Re,R.defineSkip(Re.start),R.write(Ge),_.parser.lazy[Re.start.line]){let ke=R.events.length;while(ke--)if(R.events[ke][1].start.offset<B&&(!R.events[ke][1].end||R.events[ke][1].end.offset>B))return;let qe=_.events.length,pt=qe,ht,Oe;while(pt--)if(_.events[pt][0]==="exit"&&_.events[pt][1].type==="chunkFlow"){if(ht){Oe=_.events[pt][1].end;break}ht=!0}Ee(T),ke=qe;while(ke<_.events.length)_.events[ke][1].end={...Oe},ke++;let Rt=new Ji;Rt.add(pt+1,0,_.events.slice(qe)),Rt.add(qe,ke-qe,[]),Rt.consume(_.events)}}function Ee(Re){let Ve=E.length;while(Ve-- >Re){let Ge=E[Ve];_.containerState=Ge[1],Ge[0].exit.call(_,g)}E.length=Re}function Ae(){R.write([null]),w=void 0,R=void 0,_.containerState._closeFlow=void 0}}function aD(g,_,E){return Zt(g,g.attempt(this.parser.constructs.document,_,E),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ka(g){if(g===null||dn(g)||Qo(g))return 1;if(qs(g))return 2}function Xi(g,_,E){let T=[],R=-1;while(++R<g.length){let w=g[R].resolveAll;if(w&&!T.includes(w))_=w(_,E),T.push(w)}return _}var dd={name:"attention",resolveAll:uD,tokenize:cD};function uD(g,_){let E=-1,T;while(++E<g.length)if(g[E][0]==="enter"&&g[E][1].type==="attentionSequence"&&g[E][1]._close){let R=E;while(R--)if(g[R][0]==="exit"&&g[R][1].type==="attentionSequence"&&g[R][1]._open&&_.sliceSerialize(g[R][1]).charCodeAt(0)===_.sliceSerialize(g[E][1]).charCodeAt(0)){if((g[R][1]._close||g[E][1]._open)&&(g[E][1].end.offset-g[E][1].start.offset)%3&&!((g[R][1].end.offset-g[R][1].start.offset+g[E][1].end.offset-g[E][1].start.offset)%3))continue;let w=g[R][1].end.offset-g[R][1].start.offset>1&&g[E][1].end.offset-g[E][1].start.offset>1?2:1,B={...g[R][1].end},Z={...g[E][1].start};Y1(B,-w),Y1(Z,w);let K={type:w>1?"strongSequence":"emphasisSequence",start:B,end:{...g[R][1].end}},X={type:w>1?"strongSequence":"emphasisSequence",start:{...g[E][1].start},end:Z},ee={type:w>1?"strongText":"emphasisText",start:{...g[R][1].end},end:{...g[E][1].start}},re={type:w>1?"strong":"emphasis",start:{...K.start},end:{...X.end}};if(g[R][1].end={...K.start},g[E][1].start={...X.end},T=[],g[R][1].end.offset-g[R][1].start.offset)T=Cr(T,[["enter",g[R][1],_],["exit",g[R][1],_]]);T=Cr(T,[["enter",re,_],["enter",K,_],["exit",K,_],["enter",ee,_]]),T=Cr(T,Xi(_.parser.constructs.insideSpan.null,g.slice(R+1,E),_)),T=Cr(T,[["exit",ee,_],["enter",X,_],["exit",X,_],["exit",re,_]]);let ie=0;if(g[E][1].end.offset-g[E][1].start.offset)ie=2,T=Cr(T,[["enter",g[E][1],_],["exit",g[E][1],_]]);er(g,R-1,E-R+3,T),E=R+T.length-ie-2;break}}E=-1;while(++E<g.length)if(g[E][1].type==="attentionSequence")g[E][1].type="data";return g}function cD(g,_){let E=this.parser.constructs.attentionMarkers.null,T=this.previous,R=Ka(T),w;return B;function B(K){return w=K,g.enter("attentionSequence"),Z(K)}function Z(K){if(K===w)return g.consume(K),Z;let X=g.exit("attentionSequence"),ee=Ka(K),re=!ee||ee===2&&R||E.includes(K)&&K!==42&&K!==95,ie=!R||R===2&&ee||E.includes(T)&&T!==42&&T!==95;return X._open=Boolean(w===42?re:re&&(R||!ie)),X._close=Boolean(w===42?ie:ie&&(ee||!re)),_(K)}}function Y1(g,_){g.column+=_,g.offset+=_,g._bufferIndex+=_}var W0={name:"autolink",tokenize:lD};function lD(g,_,E){let T=0;return R;function R(se){return g.enter("autolink"),g.enter("autolinkMarker"),g.consume(se),g.exit("autolinkMarker"),g.enter("autolinkProtocol"),w}function w(se){if(Yn(se))return g.consume(se),B;if(se===64)return E(se);return X(se)}function B(se){if(se===43||se===45||se===46||Bn(se))return T=1,Z(se);return X(se)}function Z(se){if(se===58)return g.consume(se),T=0,K;if((se===43||se===45||se===46||Bn(se))&&T++<32)return g.consume(se),Z;return T=0,X(se)}function K(se){if(se===62)return g.exit("autolinkProtocol"),g.enter("autolinkMarker"),g.consume(se),g.exit("autolinkMarker"),g.exit("autolink"),_;if(se===null||se===32||se===60||Hs(se))return E(se);return g.consume(se),K}function X(se){if(se===64)return g.consume(se),ee;if(B1(se))return g.consume(se),X;return E(se)}function ee(se){return Bn(se)?re(se):E(se)}function re(se){if(se===46)return g.consume(se),T=0,ee;if(se===62)return g.exit("autolinkProtocol").type="autolinkEmail",g.enter("autolinkMarker"),g.consume(se),g.exit("autolinkMarker"),g.exit("autolink"),_;return ie(se)}function ie(se){if((se===45||Bn(se))&&T++<63){let ae=se===45?ie:re;return g.consume(se),ae}return E(se)}}var ei={partial:!0,tokenize:dD};function dD(g,_,E){return T;function T(w){return Ht(w)?Zt(g,R,"linePrefix")(w):R(w)}function R(w){return w===null||vt(w)?_(w):E(w)}}var Km={continuation:{tokenize:mD},exit:fD,name:"blockQuote",tokenize:pD};function pD(g,_,E){let T=this;return R;function R(B){if(B===62){let Z=T.containerState;if(!Z.open)g.enter("blockQuote",{_container:!0}),Z.open=!0;return g.enter("blockQuotePrefix"),g.enter("blockQuoteMarker"),g.consume(B),g.exit("blockQuoteMarker"),w}return E(B)}function w(B){if(Ht(B))return g.enter("blockQuotePrefixWhitespace"),g.consume(B),g.exit("blockQuotePrefixWhitespace"),g.exit("blockQuotePrefix"),_;return g.exit("blockQuotePrefix"),_(B)}}function mD(g,_,E){let T=this;return R;function R(B){if(Ht(B))return Zt(g,w,"linePrefix",T.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B);return w(B)}function w(B){return g.attempt(Km,_,E)(B)}}function fD(g){g.exit("blockQuote")}var Jm={name:"characterEscape",tokenize:hD};function hD(g,_,E){return T;function T(w){return g.enter("characterEscape"),g.enter("escapeMarker"),g.consume(w),g.exit("escapeMarker"),R}function R(w){if(q1(w))return g.enter("characterEscapeValue"),g.consume(w),g.exit("characterEscapeValue"),g.exit("characterEscape"),_;return E(w)}}var Xm={name:"characterReference",tokenize:gD};function gD(g,_,E){let T=this,R=0,w,B;return Z;function Z(re){return g.enter("characterReference"),g.enter("characterReferenceMarker"),g.consume(re),g.exit("characterReferenceMarker"),K}function K(re){if(re===35)return g.enter("characterReferenceMarkerNumeric"),g.consume(re),g.exit("characterReferenceMarkerNumeric"),X;return g.enter("characterReferenceValue"),w=31,B=Bn,ee(re)}function X(re){if(re===88||re===120)return g.enter("characterReferenceMarkerHexadecimal"),g.consume(re),g.exit("characterReferenceMarkerHexadecimal"),g.enter("characterReferenceValue"),w=6,B=H1,ee;return g.enter("characterReferenceValue"),w=7,B=ld,ee(re)}function ee(re){if(re===59&&R){let ie=g.exit("characterReferenceValue");if(B===Bn&&!Wa(T.sliceSerialize(ie)))return E(re);return g.enter("characterReferenceMarker"),g.consume(re),g.exit("characterReferenceMarker"),g.exit("characterReference"),_}if(B(re)&&R++<w)return g.consume(re),ee;return E(re)}}var pd={partial:!0,tokenize:bD};function bD(g,_,E){let T=this;return R;function R(B){if(B===null)return E(B);return g.enter("lineEnding"),g.consume(B),g.exit("lineEnding"),w}function w(B){return T.parser.lazy[T.now().line]?E(B):_(B)}}var Qm={concrete:!0,name:"codeFenced",tokenize:SD};function SD(g,_,E){let T=this,R={partial:!0,tokenize:Ge},w=0,B=0,Z;return K;function K(ke){return X(ke)}function X(ke){let qe=T.events[T.events.length-1];return w=qe&&qe[1].type==="linePrefix"?qe[2].sliceSerialize(qe[1],!0).length:0,Z=ke,g.enter("codeFenced"),g.enter("codeFencedFence"),g.enter("codeFencedFenceSequence"),ee(ke)}function ee(ke){if(ke===Z)return B++,g.consume(ke),ee;if(B<3)return E(ke);return g.exit("codeFencedFenceSequence"),Ht(ke)?Zt(g,re,"whitespace")(ke):re(ke)}function re(ke){if(ke===null||vt(ke))return g.exit("codeFencedFence"),T.interrupt?_(ke):g.check(pd,fe,Ve)(ke);return g.enter("codeFencedFenceInfo"),g.enter("chunkString",{contentType:"string"}),ie(ke)}function ie(ke){if(ke===null||vt(ke))return g.exit("chunkString"),g.exit("codeFencedFenceInfo"),re(ke);if(Ht(ke))return g.exit("chunkString"),g.exit("codeFencedFenceInfo"),Zt(g,se,"whitespace")(ke);if(ke===96&&ke===Z)return E(ke);return g.consume(ke),ie}function se(ke){if(ke===null||vt(ke))return re(ke);return g.enter("codeFencedFenceMeta"),g.enter("chunkString",{contentType:"string"}),ae(ke)}function ae(ke){if(ke===null||vt(ke))return g.exit("chunkString"),g.exit("codeFencedFenceMeta"),re(ke);if(ke===96&&ke===Z)return E(ke);return g.consume(ke),ae}function fe(ke){return g.attempt(R,Ve,xe)(ke)}function xe(ke){return g.enter("lineEnding"),g.consume(ke),g.exit("lineEnding"),Ee}function Ee(ke){return w>0&&Ht(ke)?Zt(g,Ae,"linePrefix",w+1)(ke):Ae(ke)}function Ae(ke){if(ke===null||vt(ke))return g.check(pd,fe,Ve)(ke);return g.enter("codeFlowValue"),Re(ke)}function Re(ke){if(ke===null||vt(ke))return g.exit("codeFlowValue"),Ae(ke);return g.consume(ke),Re}function Ve(ke){return g.exit("codeFenced"),_(ke)}function Ge(ke,qe,pt){let ht=0;return Oe;function Oe(We){return ke.enter("lineEnding"),ke.consume(We),ke.exit("lineEnding"),Rt}function Rt(We){return ke.enter("codeFencedFence"),Ht(We)?Zt(ke,Nt,"linePrefix",T.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(We):Nt(We)}function Nt(We){if(We===Z)return ke.enter("codeFencedFenceSequence"),mt(We);return pt(We)}function mt(We){if(We===Z)return ht++,ke.consume(We),mt;if(ht>=B)return ke.exit("codeFencedFenceSequence"),Ht(We)?Zt(ke,_t,"whitespace")(We):_t(We);return pt(We)}function _t(We){if(We===null||vt(We))return ke.exit("codeFencedFence"),qe(We);return pt(We)}}}var md={name:"codeIndented",tokenize:ED},_D={partial:!0,tokenize:TD};function ED(g,_,E){return T;function T(Z){return g.enter("codeIndented"),Y0(g,R,E,"linePrefix",4,4)(Z)}function R(Z){if(Z===null)return B(Z);if(vt(Z))return g.attempt(_D,R,B)(Z);return g.enter("codeFlowValue"),w(Z)}function w(Z){if(Z===null||vt(Z))return g.exit("codeFlowValue"),R(Z);return g.consume(Z),w}function B(Z){return g.exit("codeIndented"),_(Z)}}function TD(g,_,E){let T=this;return R;function R(B){if(T.parser.lazy[T.now().line])return E(B);if(vt(B))return g.enter("lineEnding"),g.consume(B),g.exit("lineEnding"),R;return Y0(g,_,w,"linePrefix",4,4)(B)}function w(B){return vt(B)?R(B):E(B)}}var K0={name:"codeText",previous:vD,resolve:yD,tokenize:xD};function yD(g){let _=g.length-4,E=3,T,R;if((g[E][1].type==="lineEnding"||g[E][1].type==="space")&&(g[_][1].type==="lineEnding"||g[_][1].type==="space")){T=E;while(++T<_)if(g[T][1].type==="codeTextData"){g[E][1].type="codeTextPadding",g[_][1].type="codeTextPadding",E+=2,_-=2;break}}T=E-1,_++;while(++T<=_)if(R===void 0){if(T!==_&&g[T][1].type!=="lineEnding")R=T}else if(T===_||g[T][1].type==="lineEnding"){if(g[R][1].type="codeTextData",T!==R+2)g[R][1].end=g[T-1][1].end,g.splice(R+2,T-R-2),_-=T-R-2,T=R+2;R=void 0}return g}function vD(g){return g!==96||this.events[this.events.length-1][1].type==="characterEscape"}function xD(g,_,E){let T=this,R=0,w,B;return Z;function Z(ie){return g.enter("codeText"),g.enter("codeTextSequence"),K(ie)}function K(ie){if(ie===96)return g.consume(ie),R++,K;return g.exit("codeTextSequence"),X(ie)}function X(ie){if(ie===null)return E(ie);if(ie===32)return g.enter("space"),g.consume(ie),g.exit("space"),X;if(ie===96)return B=g.enter("codeTextSequence"),w=0,re(ie);if(vt(ie))return g.enter("lineEnding"),g.consume(ie),g.exit("lineEnding"),X;return g.enter("codeTextData"),ee(ie)}function ee(ie){if(ie===null||ie===32||ie===96||vt(ie))return g.exit("codeTextData"),X(ie);return g.consume(ie),ee}function re(ie){if(ie===96)return g.consume(ie),w++,re;if(w===R)return g.exit("codeTextSequence"),g.exit("codeText"),_(ie);return B.type="codeTextData",ee(ie)}}class J0{constructor(g){this.left=g?[...g]:[],this.right=[]}get(g){if(g<0||g>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+g+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");if(g<this.left.length)return this.left[g];return this.right[this.right.length-g+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(g,_){let E=_===null||_===void 0?Number.POSITIVE_INFINITY:_;if(E<this.left.length)return this.left.slice(g,E);if(g>this.left.length)return this.right.slice(this.right.length-E+this.left.length,this.right.length-g+this.left.length).reverse();return this.left.slice(g).concat(this.right.slice(this.right.length-E+this.left.length).reverse())}splice(g,_,E){let T=_||0;this.setCursor(Math.trunc(g));let R=this.right.splice(this.right.length-T,Number.POSITIVE_INFINITY);if(E)fd(this.left,E);return R.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(g){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(g)}pushMany(g){this.setCursor(Number.POSITIVE_INFINITY),fd(this.left,g)}unshift(g){this.setCursor(0),this.right.push(g)}unshiftMany(g){this.setCursor(0),fd(this.right,g.reverse())}setCursor(g){if(g===this.left.length||g>this.left.length&&this.right.length===0||g<0&&this.left.length===0)return;if(g<this.left.length){let _=this.left.splice(g,Number.POSITIVE_INFINITY);fd(this.right,_.reverse())}else{let _=this.right.splice(this.left.length+this.right.length-g,Number.POSITIVE_INFINITY);fd(this.left,_.reverse())}}}function fd(g,_){let E=0;if(_.length<1e4)g.push(..._);else while(E<_.length)g.push(..._.slice(E,E+1e4)),E+=1e4}function ef(g){let _={},E=-1,T,R,w,B,Z,K,X,ee=new J0(g);while(++E<ee.length){while(E in _)E=_[E];if(T=ee.get(E),E&&T[1].type==="chunkFlow"&&ee.get(E-1)[1].type==="listItemPrefix"){if(K=T[1]._tokenizer.events,w=0,w<K.length&&K[w][1].type==="lineEndingBlank")w+=2;if(w<K.length&&K[w][1].type==="content")while(++w<K.length){if(K[w][1].type==="content")break;if(K[w][1].type==="chunkText")K[w][1]._isInFirstContentOfListItem=!0,w++}}if(T[0]==="enter"){if(T[1].contentType)Object.assign(_,RD(ee,E)),E=_[E],X=!0}else if(T[1]._container){w=E,R=void 0;while(w--)if(B=ee.get(w),B[1].type==="lineEnding"||B[1].type==="lineEndingBlank"){if(B[0]==="enter"){if(R)ee.get(R)[1].type="lineEndingBlank";B[1].type="lineEnding",R=w}}else if(B[1].type==="linePrefix"||B[1].type==="listItemIndent");else break;if(R)T[1].end={...ee.get(R)[1].start},Z=ee.slice(R,E),Z.unshift(T),ee.splice(R,E-R+1,Z)}}return er(g,0,Number.POSITIVE_INFINITY,ee.slice(0)),!X}function RD(g,_){let E=g.get(_)[1],T=g.get(_)[2],R=_-1,w=[],B=E._tokenizer;if(!B){if(B=T.parser[E.contentType](E.start),E._contentTypeTextTrailing)B._contentTypeTextTrailing=!0}let Z=B.events,K=[],X={},ee,re,ie=-1,se=E,ae=0,fe=0,xe=[fe];while(se){while(g.get(++R)[1]!==se);if(w.push(R),!se._tokenizer){if(ee=T.sliceStream(se),!se.next)ee.push(null);if(re)B.defineSkip(se.start);if(se._isInFirstContentOfListItem)B._gfmTasklistFirstContentOfListItem=!0;if(B.write(ee),se._isInFirstContentOfListItem)B._gfmTasklistFirstContentOfListItem=void 0}re=se,se=se.next}se=E;while(++ie<Z.length)if(Z[ie][0]==="exit"&&Z[ie-1][0]==="enter"&&Z[ie][1].type===Z[ie-1][1].type&&Z[ie][1].start.line!==Z[ie][1].end.line)fe=ie+1,xe.push(fe),se._tokenizer=void 0,se.previous=void 0,se=se.next;if(B.events=[],se)se._tokenizer=void 0,se.previous=void 0;else xe.pop();ie=xe.length;while(ie--){let Ee=Z.slice(xe[ie],xe[ie+1]),Ae=w.pop();K.push([Ae,Ae+Ee.length-1]),g.splice(Ae,2,Ee)}K.reverse(),ie=-1;while(++ie<K.length)X[ae+K[ie][0]]=ae+K[ie][1],ae+=K[ie][1]-K[ie][0]-1;return X}var X0={resolve:ID,tokenize:CD},kD={partial:!0,tokenize:wD};function ID(g){return ef(g),g}function CD(g,_){let E;return T;function T(Z){return g.enter("content"),E=g.enter("chunkContent",{contentType:"content"}),R(Z)}function R(Z){if(Z===null)return w(Z);if(vt(Z))return g.check(kD,B,w)(Z);return g.consume(Z),R}function w(Z){return g.exit("chunkContent"),g.exit("content"),_(Z)}function B(Z){return g.consume(Z),g.exit("chunkContent"),E.next=g.enter("chunkContent",{contentType:"content",previous:E}),E=E.next,R}}function wD(g,_,E){let T=this;return R;function R(B){return g.exit("chunkContent"),g.enter("lineEnding"),g.consume(B),g.exit("lineEnding"),Zt(g,w,"linePrefix")}function w(B){if(B===null||vt(B))return E(B);let Z=T.events[T.events.length-1];if(!T.parser.constructs.disable.null.includes("codeIndented")&&Z&&Z[1].type==="linePrefix"&&Z[2].sliceSerialize(Z[1],!0).length>=4)return _(B);return g.interrupt(T.parser.constructs.flow,E,_)(B)}}function tf(g,_,E,T,R,w,B,Z,K){let X=K||Number.POSITIVE_INFINITY,ee=0;return re;function re(Ee){if(Ee===60)return g.enter(T),g.enter(R),g.enter(w),g.consume(Ee),g.exit(w),ie;if(Ee===null||Ee===32||Ee===41||Hs(Ee))return E(Ee);return g.enter(T),g.enter(B),g.enter(Z),g.enter("chunkString",{contentType:"string"}),fe(Ee)}function ie(Ee){if(Ee===62)return g.enter(w),g.consume(Ee),g.exit(w),g.exit(R),g.exit(T),_;return g.enter(Z),g.enter("chunkString",{contentType:"string"}),se(Ee)}function se(Ee){if(Ee===62)return g.exit("chunkString"),g.exit(Z),ie(Ee);if(Ee===null||Ee===60||vt(Ee))return E(Ee);return g.consume(Ee),Ee===92?ae:se}function ae(Ee){if(Ee===60||Ee===62||Ee===92)return g.consume(Ee),se;return se(Ee)}function fe(Ee){if(!ee&&(Ee===null||Ee===41||dn(Ee)))return g.exit("chunkString"),g.exit(Z),g.exit(B),g.exit(T),_(Ee);if(ee<X&&Ee===40)return g.consume(Ee),ee++,fe;if(Ee===41)return g.consume(Ee),ee--,fe;if(Ee===null||Ee===32||Ee===40||Hs(Ee))return E(Ee);return g.consume(Ee),Ee===92?xe:fe}function xe(Ee){if(Ee===40||Ee===41||Ee===92)return g.consume(Ee),fe;return fe(Ee)}}function nf(g,_,E,T,R,w){let B=this,Z=0,K;return X;function X(se){return g.enter(T),g.enter(R),g.consume(se),g.exit(R),g.enter(w),ee}function ee(se){if(Z>999||se===null||se===91||se===93&&!K||se===94&&!Z&&"_hiddenFootnoteSupport"in B.parser.constructs)return E(se);if(se===93)return g.exit(w),g.enter(R),g.consume(se),g.exit(R),g.exit(T),_;if(vt(se))return g.enter("lineEnding"),g.consume(se),g.exit("lineEnding"),ee;return g.enter("chunkString",{contentType:"string"}),re(se)}function re(se){if(se===null||se===91||se===93||vt(se)||Z++>999)return g.exit("chunkString"),ee(se);if(g.consume(se),!K)K=!Ht(se);return se===92?ie:re}function ie(se){if(se===91||se===92||se===93)return g.consume(se),Z++,re;return re(se)}}function rf(g,_,E,T,R,w){let B;return Z;function Z(ie){if(ie===34||ie===39||ie===40)return g.enter(T),g.enter(R),g.consume(ie),g.exit(R),B=ie===40?41:ie,K;return E(ie)}function K(ie){if(ie===B)return g.enter(R),g.consume(ie),g.exit(R),g.exit(T),_;return g.enter(w),X(ie)}function X(ie){if(ie===B)return g.exit(w),K(B);if(ie===null)return E(ie);if(vt(ie))return g.enter("lineEnding"),g.consume(ie),g.exit("lineEnding"),Zt(g,X,"linePrefix");return g.enter("chunkString",{contentType:"string"}),ee(ie)}function ee(ie){if(ie===B||ie===null||vt(ie))return g.exit("chunkString"),X(ie);return g.consume(ie),ie===92?re:ee}function re(ie){if(ie===B||ie===92)return g.consume(ie),ee;return ee(ie)}}function js(g,_){let E;return T;function T(R){if(vt(R))return g.enter("lineEnding"),g.consume(R),g.exit("lineEnding"),E=!0,T;if(Ht(R))return Zt(g,T,E?"linePrefix":"lineSuffix")(R);return _(R)}}var Q0={name:"definition",tokenize:PD},AD={partial:!0,tokenize:zD};function PD(g,_,E){let T=this,R;return w;function w(se){return g.enter("definition"),B(se)}function B(se){return nf.call(T,g,Z,E,"definitionLabel","definitionLabelMarker","definitionLabelString")(se)}function Z(se){if(R=br(T.sliceSerialize(T.events[T.events.length-1][1]).slice(1,-1)),se===58)return g.enter("definitionMarker"),g.consume(se),g.exit("definitionMarker"),K;return E(se)}function K(se){return dn(se)?js(g,X)(se):X(se)}function X(se){return tf(g,ee,E,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(se)}function ee(se){return g.attempt(AD,re,re)(se)}function re(se){return Ht(se)?Zt(g,ie,"whitespace")(se):ie(se)}function ie(se){if(se===null||vt(se))return g.exit("definition"),T.parser.defined.push(R),_(se);return E(se)}}function zD(g,_,E){return T;function T(Z){return dn(Z)?js(g,R)(Z):E(Z)}function R(Z){return rf(g,w,E,"definitionTitle","definitionTitleMarker","definitionTitleString")(Z)}function w(Z){return Ht(Z)?Zt(g,B,"whitespace")(Z):B(Z)}function B(Z){return Z===null||vt(Z)?_(Z):E(Z)}}var eb={name:"hardBreakEscape",tokenize:ND};function ND(g,_,E){return T;function T(w){return g.enter("hardBreakEscape"),g.consume(w),R}function R(w){if(vt(w))return g.exit("hardBreakEscape"),_(w);return E(w)}}var tb={name:"headingAtx",resolve:OD,tokenize:MD};function OD(g,_){let E=g.length-2,T=3;if(g[T][1].type==="whitespace")T+=2;if(E-2>T&&g[E][1].type==="whitespace")E-=2;if(g[E][1].type==="atxHeadingSequence"&&(T===E-1||E-4>T&&g[E-2][1].type==="whitespace"))E-=T+1===E?2:4;if(E>T){let R={type:"atxHeadingText",start:g[T][1].start,end:g[E][1].end},w={type:"chunkText",start:g[T][1].start,end:g[E][1].end,contentType:"text"};er(g,T,E-T+1,[["enter",R,_],["enter",w,_],["exit",w,_],["exit",R,_]])}return g}function MD(g,_,E){let T=0;return R;function R(ee){return g.enter("atxHeading"),w(ee)}function w(ee){return g.enter("atxHeadingSequence"),B(ee)}function B(ee){if(ee===35&&T++<6)return g.consume(ee),B;if(ee===null||dn(ee))return g.exit("atxHeadingSequence"),Z(ee);return E(ee)}function Z(ee){if(ee===35)return g.enter("atxHeadingSequence"),K(ee);if(ee===null||vt(ee))return g.exit("atxHeading"),_(ee);if(Ht(ee))return Zt(g,Z,"whitespace")(ee);return g.enter("atxHeadingText"),X(ee)}function K(ee){if(ee===35)return g.consume(ee),K;return g.exit("atxHeadingSequence"),Z(ee)}function X(ee){if(ee===null||ee===35||dn(ee))return g.exit("atxHeadingText"),Z(ee);return g.consume(ee),X}}var W1=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],nb=["pre","script","style","textarea"];var rb={concrete:!0,name:"htmlFlow",resolveTo:DD,tokenize:$D},LD={partial:!0,tokenize:UD};function DD(g){let _=g.length;while(_--)if(g[_][0]==="enter"&&g[_][1].type==="htmlFlow")break;if(_>1&&g[_-2][1].type==="linePrefix")g[_][1].start=g[_-2][1].start,g[_+1][1].start=g[_-2][1].start,g.splice(_-2,2);return g}function $D(g,_,E){let T=this,R,w,B,Z,K;return X;function X(ve){return ee(ve)}function ee(ve){return g.enter("htmlFlow"),g.enter("htmlFlowData"),g.consume(ve),re}function re(ve){if(ve===33)return g.consume(ve),ie;if(ve===47)return g.consume(ve),w=!0,fe;if(ve===63)return g.consume(ve),R=3,T.interrupt?_:ye;if(Yn(ve))return g.consume(ve),B=String.fromCharCode(ve),xe;return E(ve)}function ie(ve){if(ve===45)return g.consume(ve),R=2,se;if(ve===91)return g.consume(ve),R=5,Z=0,ae;if(Yn(ve))return g.consume(ve),R=4,T.interrupt?_:ye;return E(ve)}function se(ve){if(ve===45)return g.consume(ve),T.interrupt?_:ye;return E(ve)}function ae(ve){if(ve==="CDATA[".charCodeAt(Z++)){if(g.consume(ve),Z===6)return T.interrupt?_:Nt;return ae}return E(ve)}function fe(ve){if(Yn(ve))return g.consume(ve),B=String.fromCharCode(ve),xe;return E(ve)}function xe(ve){if(ve===null||ve===47||ve===62||dn(ve)){let tn=ve===47,nn=B.toLowerCase();if(!tn&&!w&&nb.includes(nn))return R=1,T.interrupt?_(ve):Nt(ve);if(W1.includes(B.toLowerCase())){if(R=6,tn)return g.consume(ve),Ee;return T.interrupt?_(ve):Nt(ve)}return R=7,T.interrupt&&!T.parser.lazy[T.now().line]?E(ve):w?Ae(ve):Re(ve)}if(ve===45||Bn(ve))return g.consume(ve),B+=String.fromCharCode(ve),xe;return E(ve)}function Ee(ve){if(ve===62)return g.consume(ve),T.interrupt?_:Nt;return E(ve)}function Ae(ve){if(Ht(ve))return g.consume(ve),Ae;return Oe(ve)}function Re(ve){if(ve===47)return g.consume(ve),Oe;if(ve===58||ve===95||Yn(ve))return g.consume(ve),Ve;if(Ht(ve))return g.consume(ve),Re;return Oe(ve)}function Ve(ve){if(ve===45||ve===46||ve===58||ve===95||Bn(ve))return g.consume(ve),Ve;return Ge(ve)}function Ge(ve){if(ve===61)return g.consume(ve),ke;if(Ht(ve))return g.consume(ve),Ge;return Re(ve)}function ke(ve){if(ve===null||ve===60||ve===61||ve===62||ve===96)return E(ve);if(ve===34||ve===39)return g.consume(ve),K=ve,qe;if(Ht(ve))return g.consume(ve),ke;return pt(ve)}function qe(ve){if(ve===K)return g.consume(ve),K=null,ht;if(ve===null||vt(ve))return E(ve);return g.consume(ve),qe}function pt(ve){if(ve===null||ve===34||ve===39||ve===47||ve===60||ve===61||ve===62||ve===96||dn(ve))return Ge(ve);return g.consume(ve),pt}function ht(ve){if(ve===47||ve===62||Ht(ve))return Re(ve);return E(ve)}function Oe(ve){if(ve===62)return g.consume(ve),Rt;return E(ve)}function Rt(ve){if(ve===null||vt(ve))return Nt(ve);if(Ht(ve))return g.consume(ve),Rt;return E(ve)}function Nt(ve){if(ve===45&&R===2)return g.consume(ve),At;if(ve===60&&R===1)return g.consume(ve),Et;if(ve===62&&R===4)return g.consume(ve),on;if(ve===63&&R===3)return g.consume(ve),ye;if(ve===93&&R===5)return g.consume(ve),Ut;if(vt(ve)&&(R===6||R===7))return g.exit("htmlFlowData"),g.check(LD,qt,mt)(ve);if(ve===null||vt(ve))return g.exit("htmlFlowData"),mt(ve);return g.consume(ve),Nt}function mt(ve){return g.check(pd,_t,qt)(ve)}function _t(ve){return g.enter("lineEnding"),g.consume(ve),g.exit("lineEnding"),We}function We(ve){if(ve===null||vt(ve))return mt(ve);return g.enter("htmlFlowData"),Nt(ve)}function At(ve){if(ve===45)return g.consume(ve),ye;return Nt(ve)}function Et(ve){if(ve===47)return g.consume(ve),B="",jt;return Nt(ve)}function jt(ve){if(ve===62){let tn=B.toLowerCase();if(nb.includes(tn))return g.consume(ve),on;return Nt(ve)}if(Yn(ve)&&B.length<8)return g.consume(ve),B+=String.fromCharCode(ve),jt;return Nt(ve)}function Ut(ve){if(ve===93)return g.consume(ve),ye;return Nt(ve)}function ye(ve){if(ve===62)return g.consume(ve),on;if(ve===45&&R===2)return g.consume(ve),ye;return Nt(ve)}function on(ve){if(ve===null||vt(ve))return g.exit("htmlFlowData"),qt(ve);return g.consume(ve),on}function qt(ve){return g.exit("htmlFlow"),_(ve)}}function UD(g,_,E){return T;function T(R){return g.enter("lineEnding"),g.consume(R),g.exit("lineEnding"),g.attempt(ei,_,E)}}var ob={name:"htmlText",tokenize:FD};function FD(g,_,E){let T=this,R,w,B;return Z;function Z(ye){return g.enter("htmlText"),g.enter("htmlTextData"),g.consume(ye),K}function K(ye){if(ye===33)return g.consume(ye),X;if(ye===47)return g.consume(ye),Ge;if(ye===63)return g.consume(ye),Re;if(Yn(ye))return g.consume(ye),pt;return E(ye)}function X(ye){if(ye===45)return g.consume(ye),ee;if(ye===91)return g.consume(ye),w=0,ae;if(Yn(ye))return g.consume(ye),Ae;return E(ye)}function ee(ye){if(ye===45)return g.consume(ye),se;return E(ye)}function re(ye){if(ye===null)return E(ye);if(ye===45)return g.consume(ye),ie;if(vt(ye))return B=re,Et(ye);return g.consume(ye),re}function ie(ye){if(ye===45)return g.consume(ye),se;return re(ye)}function se(ye){return ye===62?At(ye):ye===45?ie(ye):re(ye)}function ae(ye){if(ye==="CDATA[".charCodeAt(w++))return g.consume(ye),w===6?fe:ae;return E(ye)}function fe(ye){if(ye===null)return E(ye);if(ye===93)return g.consume(ye),xe;if(vt(ye))return B=fe,Et(ye);return g.consume(ye),fe}function xe(ye){if(ye===93)return g.consume(ye),Ee;return fe(ye)}function Ee(ye){if(ye===62)return At(ye);if(ye===93)return g.consume(ye),Ee;return fe(ye)}function Ae(ye){if(ye===null||ye===62)return At(ye);if(vt(ye))return B=Ae,Et(ye);return g.consume(ye),Ae}function Re(ye){if(ye===null)return E(ye);if(ye===63)return g.consume(ye),Ve;if(vt(ye))return B=Re,Et(ye);return g.consume(ye),Re}function Ve(ye){return ye===62?At(ye):Re(ye)}function Ge(ye){if(Yn(ye))return g.consume(ye),ke;return E(ye)}function ke(ye){if(ye===45||Bn(ye))return g.consume(ye),ke;return qe(ye)}function qe(ye){if(vt(ye))return B=qe,Et(ye);if(Ht(ye))return g.consume(ye),qe;return At(ye)}function pt(ye){if(ye===45||Bn(ye))return g.consume(ye),pt;if(ye===47||ye===62||dn(ye))return ht(ye);return E(ye)}function ht(ye){if(ye===47)return g.consume(ye),At;if(ye===58||ye===95||Yn(ye))return g.consume(ye),Oe;if(vt(ye))return B=ht,Et(ye);if(Ht(ye))return g.consume(ye),ht;return At(ye)}function Oe(ye){if(ye===45||ye===46||ye===58||ye===95||Bn(ye))return g.consume(ye),Oe;return Rt(ye)}function Rt(ye){if(ye===61)return g.consume(ye),Nt;if(vt(ye))return B=Rt,Et(ye);if(Ht(ye))return g.consume(ye),Rt;return ht(ye)}function Nt(ye){if(ye===null||ye===60||ye===61||ye===62||ye===96)return E(ye);if(ye===34||ye===39)return g.consume(ye),R=ye,mt;if(vt(ye))return B=Nt,Et(ye);if(Ht(ye))return g.consume(ye),Nt;return g.consume(ye),_t}function mt(ye){if(ye===R)return g.consume(ye),R=void 0,We;if(ye===null)return E(ye);if(vt(ye))return B=mt,Et(ye);return g.consume(ye),mt}function _t(ye){if(ye===null||ye===34||ye===39||ye===60||ye===61||ye===96)return E(ye);if(ye===47||ye===62||dn(ye))return ht(ye);return g.consume(ye),_t}function We(ye){if(ye===47||ye===62||dn(ye))return ht(ye);return E(ye)}function At(ye){if(ye===62)return g.consume(ye),g.exit("htmlTextData"),g.exit("htmlText"),_;return E(ye)}function Et(ye){return g.exit("htmlTextData"),g.enter("lineEnding"),g.consume(ye),g.exit("lineEnding"),jt}function jt(ye){return Ht(ye)?Zt(g,Ut,"linePrefix",T.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ye):Ut(ye)}function Ut(ye){return g.enter("htmlTextData"),B(ye)}}var Zs={name:"labelEnd",resolveAll:jD,resolveTo:ZD,tokenize:VD},BD={tokenize:GD},HD={tokenize:YD},qD={tokenize:WD};function jD(g){let _=-1,E=[];while(++_<g.length){let T=g[_][1];if(E.push(g[_]),T.type==="labelImage"||T.type==="labelLink"||T.type==="labelEnd"){let R=T.type==="labelImage"?4:2;T.type="data",_+=R}}if(g.length!==E.length)er(g,0,g.length,E);return g}function ZD(g,_){let E=g.length,T=0,R,w,B;while(E--){let ee=g[E][1];if(R){if(ee.type==="link"||ee.type==="labelLink"&&ee._inactive)break;if(g[E][0]==="enter"&&ee.type==="labelLink")ee._inactive=!0}else if(w){if(g[E][0]==="enter"&&(ee.type==="labelImage"||ee.type==="labelLink")&&!ee._balanced){if(R=E,ee.type!=="labelLink"){T=2;break}}}else if(ee.type==="labelEnd")w=E}let Z={type:g[R][1].type==="labelLink"?"link":"image",start:{...g[R][1].start},end:{...g[g.length-1][1].end}},K={type:"label",start:{...g[R][1].start},end:{...g[w][1].end}},X={type:"labelText",start:{...g[R+T+2][1].end},end:{...g[w-2][1].start}};return B=[["enter",Z,_],["enter",K,_]],B=Cr(B,g.slice(R+1,R+T+3)),B=Cr(B,[["enter",X,_]]),B=Cr(B,Xi(_.parser.constructs.insideSpan.null,g.slice(R+T+4,w-3),_)),B=Cr(B,[["exit",X,_],g[w-2],g[w-1],["exit",K,_]]),B=Cr(B,g.slice(w+1)),B=Cr(B,[["exit",Z,_]]),er(g,R,g.length,B),g}function VD(g,_,E){let T=this,R=T._labelStarts,w,B;if(R){while(R.length>0&&R[R.length-1]._balanced)R.pop();w=R[R.length-1]}return Z;function Z(ie){if(!w)return E(ie);if(w._inactive)return re(ie);return B=T.parser.defined.includes(br(T.sliceSerialize({start:w.end,end:T.now()}))),g.enter("labelEnd"),g.enter("labelMarker"),g.consume(ie),g.exit("labelMarker"),g.exit("labelEnd"),K}function K(ie){if(ie===40)return g.attempt(BD,ee,B?ee:re)(ie);if(ie===91)return g.attempt(HD,ee,B?X:re)(ie);return B?ee(ie):re(ie)}function X(ie){return g.attempt(qD,ee,re)(ie)}function ee(ie){return R.pop(),_(ie)}function re(ie){return w._balanced=!0,E(ie)}}function GD(g,_,E){return T;function T(re){return g.enter("resource"),g.enter("resourceMarker"),g.consume(re),g.exit("resourceMarker"),R}function R(re){return dn(re)?js(g,w)(re):w(re)}function w(re){if(re===41)return ee(re);return tf(g,B,Z,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(re)}function B(re){return dn(re)?js(g,K)(re):ee(re)}function Z(re){return E(re)}function K(re){if(re===34||re===39||re===40)return rf(g,X,E,"resourceTitle","resourceTitleMarker","resourceTitleString")(re);return ee(re)}function X(re){return dn(re)?js(g,ee)(re):ee(re)}function ee(re){if(re===41)return g.enter("resourceMarker"),g.consume(re),g.exit("resourceMarker"),g.exit("resource"),_;return E(re)}}function YD(g,_,E){let T=this;return R;function R(Z){return nf.call(T,g,w,B,"reference","referenceMarker","referenceString")(Z)}function w(Z){return T.parser.defined.includes(br(T.sliceSerialize(T.events[T.events.length-1][1]).slice(1,-1)))?_(Z):E(Z)}function B(Z){return E(Z)}}function WD(g,_,E){return T;function T(w){return g.enter("reference"),g.enter("referenceMarker"),g.consume(w),g.exit("referenceMarker"),R}function R(w){if(w===93)return g.enter("referenceMarker"),g.consume(w),g.exit("referenceMarker"),g.exit("reference"),_;return E(w)}}var ib={name:"labelStartImage",resolveAll:Zs.resolveAll,tokenize:KD};function KD(g,_,E){let T=this,R;return w;function w(K){return g.enter("labelImage"),g.enter("labelImageMarker"),g.consume(K),g.exit("labelImageMarker"),B}function B(K){if(K===91)return g.enter("labelMarker"),g.consume(K),g.exit("labelMarker"),R=g.exit("labelImage"),Z;return E(K)}function Z(K){if(K===94&&"_hiddenFootnoteSupport"in T.parser.constructs)return E(K);return T._labelStarts=T._labelStarts||[],T._labelStarts.push(R),_(K)}}var sb={name:"labelStartLink",resolveAll:Zs.resolveAll,tokenize:JD};function JD(g,_,E){let T=this,R;return w;function w(Z){return g.enter("labelLink"),g.enter("labelMarker"),g.consume(Z),g.exit("labelMarker"),R=g.exit("labelLink"),B}function B(Z){if(Z===94&&"_hiddenFootnoteSupport"in T.parser.constructs)return E(Z);return T._labelStarts=T._labelStarts||[],T._labelStarts.push(R),_(Z)}}var hd={name:"lineEnding",tokenize:XD};function XD(g,_){return E;function E(T){return g.enter("lineEnding"),g.consume(T),g.exit("lineEnding"),Zt(g,_,"linePrefix")}}var Vs={name:"thematicBreak",tokenize:QD};function QD(g,_,E){let T=0,R;return w;function w(X){return g.enter("thematicBreak"),B(X)}function B(X){return R=X,Z(X)}function Z(X){if(X===R)return g.enter("thematicBreakSequence"),K(X);if(T>=3&&(X===null||vt(X)))return g.exit("thematicBreak"),_(X);return E(X)}function K(X){if(X===R)return g.consume(X),T++,K;return g.exit("thematicBreakSequence"),Ht(X)?Zt(g,Z,"whitespace")(X):Z(X)}}var Sr={continuation:{tokenize:r6},exit:i6,name:"list",tokenize:n6},e6={partial:!0,tokenize:s6},t6={partial:!0,tokenize:o6};function n6(g,_,E){let T=this,R=T.events[T.events.length-1],w=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,B=0;return Z;function Z(se){let ae=T.containerState.type||(se===42||se===43||se===45?"listUnordered":"listOrdered");if(ae==="listUnordered"?!T.containerState.marker||se===T.containerState.marker:ld(se)){if(!T.containerState.type)T.containerState.type=ae,g.enter(ae,{_container:!0});if(ae==="listUnordered")return g.enter("listItemPrefix"),se===42||se===45?g.check(Vs,E,X)(se):X(se);if(!T.interrupt||se===49)return g.enter("listItemPrefix"),g.enter("listItemValue"),K(se)}return E(se)}function K(se){if(ld(se)&&++B<10)return g.consume(se),K;if((!T.interrupt||B<2)&&(T.containerState.marker?se===T.containerState.marker:se===41||se===46))return g.exit("listItemValue"),X(se);return E(se)}function X(se){return g.enter("listItemMarker"),g.consume(se),g.exit("listItemMarker"),T.containerState.marker=T.containerState.marker||se,g.check(ei,T.interrupt?E:ee,g.attempt(e6,ie,re))}function ee(se){return T.containerState.initialBlankLine=!0,w++,ie(se)}function re(se){if(Ht(se))return g.enter("listItemPrefixWhitespace"),g.consume(se),g.exit("listItemPrefixWhitespace"),ie;return E(se)}function ie(se){return T.containerState.size=w+T.sliceSerialize(g.exit("listItemPrefix"),!0).length,_(se)}}function r6(g,_,E){let T=this;return T.containerState._closeFlow=void 0,g.check(ei,R,w);function R(Z){return T.containerState.furtherBlankLines=T.containerState.furtherBlankLines||T.containerState.initialBlankLine,Zt(g,_,"listItemIndent",T.containerState.size+1)(Z)}function w(Z){if(T.containerState.furtherBlankLines||!Ht(Z))return T.containerState.furtherBlankLines=void 0,T.containerState.initialBlankLine=void 0,B(Z);return T.containerState.furtherBlankLines=void 0,T.containerState.initialBlankLine=void 0,g.attempt(t6,_,B)(Z)}function B(Z){return T.containerState._closeFlow=!0,T.interrupt=void 0,Zt(g,g.attempt(Sr,_,E),"linePrefix",T.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z)}}function o6(g,_,E){let T=this;return Zt(g,R,"listItemIndent",T.containerState.size+1);function R(w){let B=T.events[T.events.length-1];return B&&B[1].type==="listItemIndent"&&B[2].sliceSerialize(B[1],!0).length===T.containerState.size?_(w):E(w)}}function i6(g){g.exit(this.containerState.type)}function s6(g,_,E){let T=this;return Zt(g,R,"listItemPrefixWhitespace",T.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function R(w){let B=T.events[T.events.length-1];return!Ht(w)&&B&&B[1].type==="listItemPrefixWhitespace"?_(w):E(w)}}var of={name:"setextUnderline",resolveTo:a6,tokenize:u6};function a6(g,_){let E=new Ji,T=g.length,R,w,B;while(T--)if(g[T][0]==="enter"){if(g[T][1].type==="content"){R=T;break}if(g[T][1].type==="paragraph")w=T}else{if(g[T][1].type==="content")E.add(T,1,[]);if(!B&&g[T][1].type==="definition")B=T}let Z={type:"setextHeading",start:{...g[R][1].start},end:{...g[g.length-1][1].end}};if(g[w][1].type="setextHeadingText",B)E.add(w,0,[["enter",Z,_]]),E.add(B+1,0,[["exit",g[R][1],_]]),g[R][1].end={...g[B][1].end};else g[R][1]=Z;return E.add(g.length,0,[["exit",Z,_]]),E.consume(g),g}function u6(g,_,E){let T=this,R;return w;function w(X){let ee=T.events.length,re;while(ee--)if(T.events[ee][1].type!=="lineEnding"&&T.events[ee][1].type!=="linePrefix"&&T.events[ee][1].type!=="content"){re=T.events[ee][1].type==="paragraph";break}if(!T.parser.lazy[T.now().line]&&(T.interrupt||re))return g.enter("setextHeadingLine"),R=X,B(X);return E(X)}function B(X){return g.enter("setextHeadingLineSequence"),Z(X)}function Z(X){if(X===R)return g.consume(X),Z;return g.exit("setextHeadingLineSequence"),Ht(X)?Zt(g,K,"lineSuffix")(X):K(X)}function K(X){if(X===null||vt(X))return g.exit("setextHeadingLine"),_(X);return E(X)}}var K1={tokenize:c6};function c6(g){let _=this,E=g.attempt(ei,T,g.attempt(this.parser.constructs.flowInitial,R,Zt(g,g.attempt(this.parser.constructs.flow,R,g.attempt(X0,R)),"linePrefix")));return E;function T(w){if(w===null){g.consume(w);return}return g.enter("lineEndingBlank"),g.consume(w),g.exit("lineEndingBlank"),_.currentConstruct=void 0,E}function R(w){if(w===null){g.consume(w);return}return g.enter("lineEnding"),g.consume(w),g.exit("lineEnding"),_.currentConstruct=void 0,E}}var J1={resolveAll:tk()},X1=ek("string"),Q1=ek("text");function ek(g){return{resolveAll:tk(g==="text"?l6:void 0),tokenize:_};function _(E){let T=this,R=this.parser.constructs[g],w=E.attempt(R,B,Z);return B;function B(ee){return X(ee)?w(ee):Z(ee)}function Z(ee){if(ee===null){E.consume(ee);return}return E.enter("data"),E.consume(ee),K}function K(ee){if(X(ee))return E.exit("data"),w(ee);return E.consume(ee),K}function X(ee){if(ee===null)return!0;let re=R[ee],ie=-1;if(re)while(++ie<re.length){let se=re[ie];if(!se.previous||se.previous.call(T,T.previous))return!0}return!1}}}function tk(g){return _;function _(E,T){let R=-1,w;while(++R<=E.length)if(w===void 0){if(E[R]&&E[R][1].type==="data")w=R,R++}else if(!E[R]||E[R][1].type!=="data"){if(R!==w+2)E[w][1].end=E[R-1][1].end,E.splice(w+2,R-w-2),R=w+2;w=void 0}return g?g(E,T):E}}function l6(g,_){let E=new Ji,T=0;while(++T<=g.length)if((T===g.length||g[T][1].type==="lineEnding")&&g[T-1][1].type==="data"){let R=g[T-1][1],w=_.sliceStream(R),B=w.length,Z=-1,K=0,X;while(B--){let ee=w[B];if(typeof ee==="string"){Z=ee.length;while(ee.charCodeAt(Z-1)===32)K++,Z--;if(Z)break;Z=-1}else if(ee===-2)X=!0,K++;else if(ee===-1);else{B++;break}}if(_._contentTypeTextTrailing&&T===g.length)K=0;if(K){let ee={type:T===g.length||X||K<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:B?Z:R.start._bufferIndex+Z,_index:R.start._index+B,line:R.end.line,column:R.end.column-K,offset:R.end.offset-K},end:{...R.end}};if(R.end={...ee.start},R.start.offset===R.end.offset)Object.assign(R,ee);else E.add(T,0,[["enter",ee,_],["exit",ee,_]])}T++}return E.consume(g),g}var ab={};Ze(ab,{attentionMarkers:()=>S6,contentInitial:()=>p6,disable:()=>_6,document:()=>d6,flow:()=>f6,flowInitial:()=>m6,insideSpan:()=>b6,string:()=>h6,text:()=>g6});var d6={[42]:Sr,[43]:Sr,[45]:Sr,[48]:Sr,[49]:Sr,[50]:Sr,[51]:Sr,[52]:Sr,[53]:Sr,[54]:Sr,[55]:Sr,[56]:Sr,[57]:Sr,[62]:Km},p6={[91]:Q0},m6={[-2]:md,[-1]:md,[32]:md},f6={[35]:tb,[42]:Vs,[45]:[of,Vs],[60]:rb,[61]:of,[95]:Vs,[96]:Qm,[126]:Qm},h6={[38]:Xm,[92]:Jm},g6={[-5]:hd,[-4]:hd,[-3]:hd,[33]:ib,[38]:Xm,[42]:dd,[60]:[W0,ob],[91]:sb,[92]:[eb,Jm],[93]:Zs,[95]:dd,[96]:K0},b6={null:[dd,J1]},S6={null:[42,95]},_6={null:[]};function nk(g,_,E){let T={_bufferIndex:-1,_index:0,line:E&&E.line||1,column:E&&E.column||1,offset:E&&E.offset||0},R={},w=[],B=[],Z=[],K=!0,X={attempt:ht(qe),check:ht(pt),consume:Ve,enter:Ge,exit:ke,interrupt:ht(pt,{interrupt:!0})},ee={code:null,containerState:{},defineSkip:Ee,events:[],now:xe,parser:g,previous:null,sliceSerialize:ae,sliceStream:fe,write:se},re=_.tokenize.call(ee,X),ie;if(_.resolveAll)w.push(_);return ee;function se(mt){if(B=Cr(B,mt),Ae(),B[B.length-1]!==null)return[];return Oe(_,0),ee.events=Xi(w,ee.events,ee),ee.events}function ae(mt,_t){return T6(fe(mt),_t)}function fe(mt){return E6(B,mt)}function xe(){let{_bufferIndex:mt,_index:_t,line:We,column:At,offset:Et}=T;return{_bufferIndex:mt,_index:_t,line:We,column:At,offset:Et}}function Ee(mt){R[mt.line]=mt.column,Nt()}function Ae(){while(T._index<B.length){let mt=B[T._index];if(typeof mt==="string"){let _t=T._index;if(T._bufferIndex<0)T._bufferIndex=0;while(T._index===_t&&T._bufferIndex<mt.length)Re(mt.charCodeAt(T._bufferIndex))}else Re(mt)}}function Re(mt){K=void 0,ie=mt,re=re(mt)}function Ve(mt){if(vt(mt))T.line++,T.column=1,T.offset+=mt===-3?2:1,Nt();else if(mt!==-1)T.column++,T.offset++;if(T._bufferIndex<0)T._index++;else if(T._bufferIndex++,T._bufferIndex===B[T._index].length)T._bufferIndex=-1,T._index++;ee.previous=mt,K=!0}function Ge(mt,_t){let We=_t||{};return We.type=mt,We.start=xe(),ee.events.push(["enter",We,ee]),Z.push(We),We}function ke(mt){let _t=Z.pop();return _t.end=xe(),ee.events.push(["exit",_t,ee]),_t}function qe(mt,_t){Oe(mt,_t.from)}function pt(mt,_t){_t.restore()}function ht(mt,_t){return We;function We(At,Et,jt){let Ut,ye,on,qt;return Array.isArray(At)?tn(At):("tokenize"in At)?tn([At]):ve(At);function ve(Wt){return bn;function bn(cn){let un=cn!==null&&Wt[cn],Tn=cn!==null&&Wt.null,_n=[...Array.isArray(un)?un:un?[un]:[],...Array.isArray(Tn)?Tn:Tn?[Tn]:[]];return tn(_n)(cn)}}function tn(Wt){if(Ut=Wt,ye=0,Wt.length===0)return jt;return nn(Wt[ye])}function nn(Wt){return bn;function bn(cn){if(qt=Rt(),on=Wt,!Wt.partial)ee.currentConstruct=Wt;if(Wt.name&&ee.parser.constructs.disable.null.includes(Wt.name))return Kt(cn);return Wt.tokenize.call(_t?Object.assign(Object.create(ee),_t):ee,X,$t,Kt)(cn)}}function $t(Wt){return K=!0,mt(on,qt),Et}function Kt(Wt){if(K=!0,qt.restore(),++ye<Ut.length)return nn(Ut[ye]);return jt}}}function Oe(mt,_t){if(mt.resolveAll&&!w.includes(mt))w.push(mt);if(mt.resolve)er(ee.events,_t,ee.events.length-_t,mt.resolve(ee.events.slice(_t),ee));if(mt.resolveTo)ee.events=mt.resolveTo(ee.events,ee)}function Rt(){let mt=xe(),{previous:_t,currentConstruct:We}=ee,At=ee.events.length,Et=Array.from(Z);return{from:At,restore:jt};function jt(){T=mt,ee.previous=_t,ee.currentConstruct=We,ee.events.length=At,Z=Et,Nt()}}function Nt(){if(T.line in R&&T.column<2)T.column=R[T.line],T.offset+=R[T.line]-1}}function E6(g,_){let E=_.start._index,T=_.start._bufferIndex,R=_.end._index,w=_.end._bufferIndex,B;if(E===R)B=[g[E].slice(T,w)];else{if(B=g.slice(E,R),T>-1){let Z=B[0];if(typeof Z==="string")B[0]=Z.slice(T);else B.shift()}if(w>0)B.push(g[R].slice(0,w))}return B}function T6(g,_){let E=-1,T=[],R;while(++E<g.length){let w=g[E],B;if(typeof w==="string")B=w;else switch(w){case-5:{B="\r";break}case-4:{B=`
|
|
104
|
+
`;break}case-3:{B=`\r
|
|
105
|
+
`;break}case-2:{B=_?" ":"\t";break}case-1:{if(!_&&R)continue;B=" ";break}default:B=String.fromCharCode(w)}R=w===-2,T.push(B)}return T.join("")}function ub(g){let T={constructs:Ym([ab,...(g||{}).extensions||[]]),content:R(j1),defined:[],document:R(G1),flow:R(K1),lazy:{},string:R(X1),text:R(Q1)};return T;function R(w){return B;function B(Z){return nk(T,w,Z)}}}function cb(g){while(!ef(g));return g}var rk=/[\0\t\n\r]/g;function lb(){let g=1,_="",E=!0,T;return R;function R(w,B,Z){w=_+(typeof w==="string"?w.toString():new TextDecoder(B||void 0).decode(w));let K=[],X=0;if(_="",E){if(w.charCodeAt(0)===65279)X++;E=void 0}while(X<w.length){rk.lastIndex=X;let ee=rk.exec(w),re=ee&&ee.index!==void 0?ee.index:w.length,ie=w.charCodeAt(re);if(!ee){_=w.slice(X);break}if(ie===10&&X===re&&T)K.push(-3),T=void 0;else{if(T)K.push(-5),T=void 0;if(X<re)K.push(w.slice(X,re)),g+=re-X;switch(ie){case 0:{K.push(65533),g++;break}case 9:{let se=Math.ceil(g/4)*4;K.push(-2);while(g++<se)K.push(-1);break}case 10:{K.push(-4),g=1;break}default:T=!0,g=1}}X=re+1}if(Z){if(T)K.push(-5);if(_)K.push(_);K.push(null)}return K}}var y6=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ok(g){return g.replace(y6,v6)}function v6(g,_,E){if(_)return _;if(E.charCodeAt(0)===35){let R=E.charCodeAt(1),w=R===120||R===88;return Wm(E.slice(w?2:1),w?16:10)}return Wa(E)||g}var sk={}.hasOwnProperty;function db(g,_,E){if(_&&typeof _==="object")E=_,_=void 0;return x6(E)(cb(ub(E).document().write(lb()(g,_,!0))))}function x6(g){let _={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:B(wi),autolinkProtocol:Oe,autolinkEmail:Oe,atxHeading:B(Br),blockQuote:B(un),characterEscape:Oe,characterReference:Oe,codeFenced:B(Tn),codeFencedFenceInfo:Z,codeFencedFenceMeta:Z,codeIndented:B(Tn,Z),codeText:B(_n,Z),codeTextData:Oe,data:Oe,codeFlowValue:Oe,definition:B(sn),definitionDestinationString:Z,definitionLabelString:Z,definitionTitleString:Z,emphasis:B(yn),hardBreakEscape:B(_o),hardBreakTrailing:B(_o),htmlFlow:B(Ci,Z),htmlFlowData:Oe,htmlText:B(Ci,Z),htmlTextData:Oe,image:B(is),label:Z,link:B(wi),listItem:B(ss),listItemValue:se,listOrdered:B(Ai,ie),listUnordered:B(Ai),paragraph:B(as),reference:tn,referenceString:Z,resourceDestinationString:Z,resourceTitleString:Z,setextHeading:B(Br),strong:B(us),thematicBreak:B(ls)},exit:{atxHeading:X(),atxHeadingSequence:ke,autolink:X(),autolinkEmail:cn,autolinkProtocol:bn,blockQuote:X(),characterEscapeValue:Rt,characterReferenceMarkerHexadecimal:$t,characterReferenceMarkerNumeric:$t,characterReferenceValue:Kt,characterReference:Wt,codeFenced:X(Ee),codeFencedFence:xe,codeFencedFenceInfo:ae,codeFencedFenceMeta:fe,codeFlowValue:Rt,codeIndented:X(Ae),codeText:X(At),codeTextData:Rt,data:Rt,definition:X(),definitionDestinationString:Ge,definitionLabelString:Re,definitionTitleString:Ve,emphasis:X(),hardBreakEscape:X(mt),hardBreakTrailing:X(mt),htmlFlow:X(_t),htmlFlowData:Rt,htmlText:X(We),htmlTextData:Rt,image:X(jt),label:ye,labelText:Ut,lineEnding:Nt,link:X(Et),listItem:X(),listOrdered:X(),listUnordered:X(),paragraph:X(),referenceString:nn,resourceDestinationString:on,resourceTitleString:qt,resource:ve,setextHeading:X(ht),setextHeadingLineSequence:pt,setextHeadingText:qe,strong:X(),thematicBreak:X()}};ak(_,(g||{}).mdastExtensions||[]);let E={};return T;function T(Ue){let ft={type:"root",children:[],position:void 0},Gt={stack:[ft],tokenStack:[],config:_,enter:K,exit:ee,buffer:Z,resume:re,data:E},Qt=[],$n=[],Sn=-1;while(++Sn<Ue.length)if($n.push(Ue[Sn]),Ue[Sn][1].type==="listOrdered"||Ue[Sn][1].type==="listUnordered")if(Ue[Sn][0]==="enter")Qt.push($n.length-1);else{let Un=Qt.pop();w($n,Un)}Ue=$n,Sn=-1;while(++Sn<Ue.length){let Un=_[Ue[Sn][0]];if(Ue[Sn][0]==="enter"&&_.beforeEnter.length>0)R(_.beforeEnter,{...Gt,sliceSerialize:Ue[Sn][2].sliceSerialize},Ue[Sn][1]);if(sk.call(Un,Ue[Sn][1].type))Un[Ue[Sn][1].type].call({...Gt,sliceSerialize:Ue[Sn][2].sliceSerialize},Ue[Sn][1]);if(Ue[Sn][0]==="exit"&&_.afterExit.length>0)R(_.afterExit,{...Gt,sliceSerialize:Ue[Sn][2].sliceSerialize},Ue[Sn][1])}if(Gt.tokenStack.length>0){let Un=Gt.tokenStack[Gt.tokenStack.length-1];(Un[1]||ik).call(Gt,void 0,Un[0])}ft.position={start:Qi(Ue.length>0?Ue[0][1].start:{line:1,column:1,offset:0}),end:Qi(Ue.length>0?Ue[Ue.length-2][1].end:{line:1,column:1,offset:0})},Sn=-1;while(++Sn<_.transforms.length)ft=_.transforms[Sn](ft)||ft;return ft}function R(Ue,ft,Gt){let Qt=-1;while(++Qt<Ue.length)Ue[Qt].call(ft,Gt)}function w(Ue,ft){let Gt=Ue.length-1,Qt=ft-1,$n=-1,Sn=!1,Un,dr,Nr,Eo,Kn=[];while(++Qt<=Gt){let qn=Ue[Qt];switch(qn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{if(qn[0]==="enter")$n++;else $n--;Eo=void 0;break}case"lineEndingBlank":{if(qn[0]==="enter"){if(Un&&!Eo&&!$n&&!Nr)Nr=Qt;Eo=void 0}break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Eo=void 0}if(!$n&&qn[0]==="enter"&&qn[1].type==="listItemPrefix"||$n===-1&&qn[0]==="exit"&&(qn[1].type==="listUnordered"||qn[1].type==="listOrdered")){if(Un){let eo=Qt;dr=void 0;while(eo--){let pr=Ue[eo];if(pr[1].type==="lineEnding"||pr[1].type==="lineEndingBlank"){if(pr[0]==="exit")continue;if(dr)Ue[dr][1].type="lineEndingBlank",Sn=!0;pr[1].type="lineEnding",dr=eo}else if(pr[1].type==="linePrefix"||pr[1].type==="blockQuotePrefix"||pr[1].type==="blockQuotePrefixWhitespace"||pr[1].type==="blockQuoteMarker"||pr[1].type==="listItemIndent");else break}if(Nr&&(!dr||Nr<dr))Un._spread=!0;Un.end=Object.assign({},dr?Ue[dr][1].start:qn[1].end),Kn.push({at:dr||Qt,event:["exit",Un,qn[2]]})}if(qn[1].type==="listItemPrefix"){let eo={type:"listItem",_spread:!1,start:Object.assign({},qn[1].start),end:void 0};Un=eo,Kn.push({at:Qt,event:["enter",eo,qn[2]]}),Nr=void 0,Eo=!0}}}let oi=Ue.splice(ft),Uo=0;Qt=-1;while(++Qt<oi.length){while(Uo<Kn.length&&Kn[Uo].at===ft+Qt)Ue.push(Kn[Uo++].event);Ue.push(oi[Qt])}Ue[ft][1]._spread=Sn}function B(Ue,ft){return Gt;function Gt(Qt){if(K.call(this,Ue(Qt),Qt),ft)ft.call(this,Qt)}}function Z(){this.stack.push({type:"fragment",children:[]})}function K(Ue,ft,Gt){this.stack[this.stack.length-1].children.push(Ue),this.stack.push(Ue),this.tokenStack.push([ft,Gt||void 0]),Ue.position={start:Qi(ft.start),end:void 0}}function X(Ue){return ft;function ft(Gt){if(Ue)Ue.call(this,Gt);ee.call(this,Gt)}}function ee(Ue,ft){let Gt=this.stack.pop(),Qt=this.tokenStack.pop();if(!Qt)throw Error("Cannot close `"+Ue.type+"` ("+Wi({start:Ue.start,end:Ue.end})+"): it’s not open");if(Qt[0].type!==Ue.type)if(ft)ft.call(this,Ue,Qt[0]);else(Qt[1]||ik).call(this,Ue,Qt[0]);Gt.position.end=Qi(Ue.end)}function re(){return Bs(this.stack.pop())}function ie(){this.data.expectingFirstListItemValue=!0}function se(Ue){if(this.data.expectingFirstListItemValue){let ft=this.stack[this.stack.length-2];ft.start=Number.parseInt(this.sliceSerialize(Ue),10),this.data.expectingFirstListItemValue=void 0}}function ae(){let Ue=this.resume(),ft=this.stack[this.stack.length-1];ft.lang=Ue}function fe(){let Ue=this.resume(),ft=this.stack[this.stack.length-1];ft.meta=Ue}function xe(){if(this.data.flowCodeInside)return;this.buffer(),this.data.flowCodeInside=!0}function Ee(){let Ue=this.resume(),ft=this.stack[this.stack.length-1];ft.value=Ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function Ae(){let Ue=this.resume(),ft=this.stack[this.stack.length-1];ft.value=Ue.replace(/(\r?\n|\r)$/g,"")}function Re(Ue){let ft=this.resume(),Gt=this.stack[this.stack.length-1];Gt.label=ft,Gt.identifier=br(this.sliceSerialize(Ue)).toLowerCase()}function Ve(){let Ue=this.resume(),ft=this.stack[this.stack.length-1];ft.title=Ue}function Ge(){let Ue=this.resume(),ft=this.stack[this.stack.length-1];ft.url=Ue}function ke(Ue){let ft=this.stack[this.stack.length-1];if(!ft.depth){let Gt=this.sliceSerialize(Ue).length;ft.depth=Gt}}function qe(){this.data.setextHeadingSlurpLineEnding=!0}function pt(Ue){let ft=this.stack[this.stack.length-1];ft.depth=this.sliceSerialize(Ue).codePointAt(0)===61?1:2}function ht(){this.data.setextHeadingSlurpLineEnding=void 0}function Oe(Ue){let Gt=this.stack[this.stack.length-1].children,Qt=Gt[Gt.length-1];if(!Qt||Qt.type!=="text")Qt=cs(),Qt.position={start:Qi(Ue.start),end:void 0},Gt.push(Qt);this.stack.push(Qt)}function Rt(Ue){let ft=this.stack.pop();ft.value+=this.sliceSerialize(Ue),ft.position.end=Qi(Ue.end)}function Nt(Ue){let ft=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Gt=ft.children[ft.children.length-1];Gt.position.end=Qi(Ue.end),this.data.atHardBreak=void 0;return}if(!this.data.setextHeadingSlurpLineEnding&&_.canContainEols.includes(ft.type))Oe.call(this,Ue),Rt.call(this,Ue)}function mt(){this.data.atHardBreak=!0}function _t(){let Ue=this.resume(),ft=this.stack[this.stack.length-1];ft.value=Ue}function We(){let Ue=this.resume(),ft=this.stack[this.stack.length-1];ft.value=Ue}function At(){let Ue=this.resume(),ft=this.stack[this.stack.length-1];ft.value=Ue}function Et(){let Ue=this.stack[this.stack.length-1];if(this.data.inReference){let ft=this.data.referenceType||"shortcut";Ue.type+="Reference",Ue.referenceType=ft,delete Ue.url,delete Ue.title}else delete Ue.identifier,delete Ue.label;this.data.referenceType=void 0}function jt(){let Ue=this.stack[this.stack.length-1];if(this.data.inReference){let ft=this.data.referenceType||"shortcut";Ue.type+="Reference",Ue.referenceType=ft,delete Ue.url,delete Ue.title}else delete Ue.identifier,delete Ue.label;this.data.referenceType=void 0}function Ut(Ue){let ft=this.sliceSerialize(Ue),Gt=this.stack[this.stack.length-2];Gt.label=ok(ft),Gt.identifier=br(ft).toLowerCase()}function ye(){let Ue=this.stack[this.stack.length-1],ft=this.resume(),Gt=this.stack[this.stack.length-1];if(this.data.inReference=!0,Gt.type==="link"){let Qt=Ue.children;Gt.children=Qt}else Gt.alt=ft}function on(){let Ue=this.resume(),ft=this.stack[this.stack.length-1];ft.url=Ue}function qt(){let Ue=this.resume(),ft=this.stack[this.stack.length-1];ft.title=Ue}function ve(){this.data.inReference=void 0}function tn(){this.data.referenceType="collapsed"}function nn(Ue){let ft=this.resume(),Gt=this.stack[this.stack.length-1];Gt.label=ft,Gt.identifier=br(this.sliceSerialize(Ue)).toLowerCase(),this.data.referenceType="full"}function $t(Ue){this.data.characterReferenceType=Ue.type}function Kt(Ue){let ft=this.sliceSerialize(Ue),Gt=this.data.characterReferenceType,Qt;if(Gt)Qt=Wm(ft,Gt==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0;else Qt=Wa(ft);let $n=this.stack[this.stack.length-1];$n.value+=Qt}function Wt(Ue){let ft=this.stack.pop();ft.position.end=Qi(Ue.end)}function bn(Ue){Rt.call(this,Ue);let ft=this.stack[this.stack.length-1];ft.url=this.sliceSerialize(Ue)}function cn(Ue){Rt.call(this,Ue);let ft=this.stack[this.stack.length-1];ft.url="mailto:"+this.sliceSerialize(Ue)}function un(){return{type:"blockquote",children:[],position:void 0}}function Tn(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function _n(){return{type:"inlineCode",value:"",position:void 0}}function sn(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function yn(){return{type:"emphasis",children:[],position:void 0}}function Br(){return{type:"heading",depth:0,children:[],position:void 0}}function _o(){return{type:"break",position:void 0}}function Ci(){return{type:"html",value:"",position:void 0}}function is(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function wi(){return{type:"link",title:null,url:"",children:[],position:void 0}}function Ai(Ue){return{type:"list",ordered:Ue.type==="listOrdered",start:null,spread:Ue._spread,children:[],position:void 0}}function ss(Ue){return{type:"listItem",spread:Ue._spread,checked:null,children:[],position:void 0}}function as(){return{type:"paragraph",children:[],position:void 0}}function us(){return{type:"strong",children:[],position:void 0}}function cs(){return{type:"text",value:"",position:void 0}}function ls(){return{type:"thematicBreak",position:void 0}}}function Qi(g){return{line:g.line,column:g.column,offset:g.offset}}function ak(g,_){let E=-1;while(++E<_.length){let T=_[E];if(Array.isArray(T))ak(g,T);else R6(g,T)}}function R6(g,_){let E;for(E in _)if(sk.call(_,E))switch(E){case"canContainEols":{let T=_[E];if(T)g[E].push(...T);break}case"transforms":{let T=_[E];if(T)g[E].push(...T);break}case"afterExit":case"beforeEnter":{let T=_[E];if(T)g[E].push(T);break}case"enter":case"exit":{let T=_[E];if(T)Object.assign(g[E],T);break}}}function ik(g,_){if(g)throw Error("Cannot close `"+g.type+"` ("+Wi({start:g.start,end:g.end})+"): a different token (`"+_.type+"`, "+Wi({start:_.start,end:_.end})+") is open");throw Error("Cannot close document, a token (`"+_.type+"`, "+Wi({start:_.start,end:_.end})+") is still open")}function sf(g){let _=this;_.parser=E;function E(T){return db(T,{..._.data("settings"),...g,extensions:_.data("micromarkExtensions")||[],mdastExtensions:_.data("fromMarkdownExtensions")||[]})}}var af=-1,Ja=0,Gs=1,Xa=2,gd=3,bd=4,Sd=5,_d=6,uf=7,cf=8;var{defineProperty:k6}=Object,ck=typeof self==="object"?self:globalThis,uk=(g,_)=>{switch(g){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw TypeError("unable to deserialize "+g)}return new ck[g](_)},I6=(g,_)=>{let E=(R,w)=>(g.set(w,R),R),T=(R)=>{if(g.has(R))return g.get(R);let[w,B]=_[R];switch(w){case Ja:case af:return E(B,R);case Gs:{let Z=E([],R);for(let K of B)Z.push(T(K));return Z}case Xa:{let Z=E({},R);for(let[K,X]of B){let ee=T(K),re=T(X);if(ee==="__proto__")k6(Z,ee,{value:re,configurable:!0,enumerable:!0,writable:!0});else Z[ee]=re}return Z}case gd:return E(new Date(B),R);case bd:{let{source:Z,flags:K}=B;return E(new RegExp(Z,K),R)}case Sd:{let Z=E(new Map,R);for(let[K,X]of B)Z.set(T(K),T(X));return Z}case _d:{let Z=E(new Set,R);for(let K of B)Z.add(T(K));return Z}case uf:{let{name:Z,message:K}=B;return E(typeof ck[Z]==="function"?uk(Z,K):Error(K),R)}case cf:return E(BigInt(B),R);case"BigInt":return E(Object(BigInt(B)),R);case"ArrayBuffer":return E(new Uint8Array(B).buffer,B);case"DataView":{let{buffer:Z}=new Uint8Array(B);return E(new DataView(Z),B)}case"-0":return-0}return E(uk(w,B),R)};return T},pb=(g)=>I6(new Map,g)(0);var Ys="",{toString:C6}={},{keys:w6,is:A6}=Object,Ed=(g)=>{let _=typeof g;if(_!=="object"||!g)return[Ja,_];let E=C6.call(g).slice(8,-1);switch(E){case"Array":return[Gs,Ys];case"Object":return[Xa,Ys];case"Date":return[gd,Ys];case"RegExp":return[bd,Ys];case"Map":return[Sd,Ys];case"Set":return[_d,Ys];case"DataView":return[Gs,E]}if(E.includes("Array"))return[Gs,E];if(g instanceof Error)return[uf,g.name||"Error"];return[Xa,E]},lf=([g,_])=>g===Ja&&(_==="function"||_==="symbol"),P6=(g,_,E,T)=>{let R=(B,Z)=>{let K=T.push(B)-1;return E.set(Z,K),K},w=(B)=>{if(E.has(B))return E.get(B);let[Z,K]=Ed(B);switch(Z){case Ja:{let ee=B;switch(K){case"bigint":Z=cf,ee=B.toString();break;case"number":if(!B&&A6(B,-0))return T.push(["-0"])-1;break;case"function":case"symbol":if(g)throw TypeError("unable to serialize "+K);ee=null;break;case"undefined":return R([af],B)}return R([Z,ee],B)}case Gs:{if(K){let ie=B;if(K==="DataView")ie=new Uint8Array(B.buffer);else if(K==="ArrayBuffer")ie=new Uint8Array(B);return R([K,[...ie]],B)}let ee=[],re=R([Z,ee],B);for(let ie of B)ee.push(w(ie));return re}case Xa:{if(K)switch(K){case"BigInt":return R([K,B.toString()],B);case"Boolean":case"Number":case"String":return R([K,B.valueOf()],B)}if(_&&"toJSON"in B)return w(B.toJSON());let ee=[],re=R([Z,ee],B);for(let ie of w6(B))if(g||!lf(Ed(B[ie])))ee.push([w(ie),w(B[ie])]);return re}case gd:return R([Z,isNaN(B.getTime())?Ys:B.toISOString()],B);case bd:{let{source:ee,flags:re}=B;return R([Z,{source:ee,flags:re}],B)}case Sd:{let ee=[],re=R([Z,ee],B);for(let[ie,se]of B)if(g||!(lf(Ed(ie))||lf(Ed(se))))ee.push([w(ie),w(se)]);return re}case _d:{let ee=[],re=R([Z,ee],B);for(let ie of B)if(g||!lf(Ed(ie)))ee.push(w(ie));return re}}let{message:X}=B;return R([Z,{name:K,message:X}],B)};return w},mb=(g,{json:_,lossy:E}={})=>{let T=[];return P6(!(_||E),!!_,new Map,T)(g),T};var Ei=typeof structuredClone==="function"?(g,_)=>_&&(("json"in _)||("lossy"in _))?pb(mb(g,_)):structuredClone(g):(g,_)=>pb(mb(g,_));function z6(g,_){let E=[{type:"text",value:"↩"}];if(_>1)E.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(_)}]});return E}function N6(g,_){return"Back to reference "+(g+1)+(_>1?"-"+_:"")}function lk(g){let _=typeof g.options.clobberPrefix==="string"?g.options.clobberPrefix:"user-content-",E=g.options.footnoteBackContent||z6,T=g.options.footnoteBackLabel||N6,R=g.options.footnoteLabel||"Footnotes",w=g.options.footnoteLabelTagName||"h2",B=g.options.footnoteLabelProperties||{className:["sr-only"]},Z=[],K=-1;while(++K<g.footnoteOrder.length){let X=g.footnoteById.get(g.footnoteOrder[K]);if(!X)continue;let ee=g.all(X),re=String(X.identifier).toUpperCase(),ie=So(re.toLowerCase()),se=0,ae=[],fe=g.footnoteCounts.get(re);while(fe!==void 0&&++se<=fe){if(ae.length>0)ae.push({type:"text",value:" "});let Ae=typeof E==="string"?E:E(K,se);if(typeof Ae==="string")Ae={type:"text",value:Ae};ae.push({type:"element",tagName:"a",properties:{href:"#"+_+"fnref-"+ie+(se>1?"-"+se:""),dataFootnoteBackref:"",ariaLabel:typeof T==="string"?T:T(K,se),className:["data-footnote-backref"]},children:Array.isArray(Ae)?Ae:[Ae]})}let xe=ee[ee.length-1];if(xe&&xe.type==="element"&&xe.tagName==="p"){let Ae=xe.children[xe.children.length-1];if(Ae&&Ae.type==="text")Ae.value+=" ";else xe.children.push({type:"text",value:" "});xe.children.push(...ae)}else ee.push(...ae);let Ee={type:"element",tagName:"li",properties:{id:_+"fn-"+ie},children:g.wrap(ee,!0)};g.patch(X,Ee),Z.push(Ee)}if(Z.length===0)return;return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:w,properties:{...Ei(B),id:"footnote-label"},children:[{type:"text",value:R}]},{type:"text",value:`
|
|
106
|
+
`},{type:"element",tagName:"ol",properties:{},children:g.wrap(Z,!0)},{type:"text",value:`
|
|
107
|
+
`}]}}var es=function(g){if(g===null||g===void 0)return D6;if(typeof g==="function")return df(g);if(typeof g==="object")return Array.isArray(g)?O6(g):M6(g);if(typeof g==="string")return L6(g);throw Error("Expected function, string, or object as test")};function O6(g){let _=[],E=-1;while(++E<g.length)_[E]=es(g[E]);return df(T);function T(...R){let w=-1;while(++w<_.length)if(_[w].apply(this,R))return!0;return!1}}function M6(g){let _=g;return df(E);function E(T){let R=T,w;for(w in g)if(R[w]!==_[w])return!1;return!0}}function L6(g){return df(_);function _(E){return E&&E.type===g}}function df(g){return _;function _(E,T,R){return Boolean($6(E)&&g.call(this,E,typeof T==="number"?T:void 0,R||void 0))}}function D6(){return!0}function $6(g){return g!==null&&typeof g==="object"&&"type"in g}function dk(g){return g}var pk=[],pf=!0,Ws=!1,mf="skip";function Td(g,_,E,T){let R;if(typeof _==="function"&&typeof E!=="function")T=E,E=_;else R=_;let w=es(R),B=T?-1:1;Z(g,void 0,[])();function Z(K,X,ee){let re=K&&typeof K==="object"?K:{};if(typeof re.type==="string"){let se=typeof re.tagName==="string"?re.tagName:typeof re.name==="string"?re.name:void 0;Object.defineProperty(ie,"name",{value:"node ("+dk(K.type+(se?"<"+se+">":""))+")"})}return ie;function ie(){let se=pk,ae,fe,xe;if(!_||w(K,X,ee[ee.length-1]||void 0)){if(se=U6(E(K,ee)),se[0]===Ws)return se}if("children"in K&&K.children){let Ee=K;if(Ee.children&&se[0]!==mf){fe=(T?Ee.children.length:-1)+B,xe=ee.concat(Ee);while(fe>-1&&fe<Ee.children.length){let Ae=Ee.children[fe];if(ae=Z(Ae,fe,xe)(),ae[0]===Ws)return ae;fe=typeof ae[1]==="number"?ae[1]:fe+B}}}return se}}}function U6(g){if(Array.isArray(g))return g;if(typeof g==="number")return[pf,g];return g===null||g===void 0?pk:[g]}function Ti(g,_,E,T){let R,w,B;if(typeof _==="function"&&typeof E!=="function")w=void 0,B=_,R=E;else w=_,B=E,R=T;Td(g,w,Z,R);function Z(K,X){let ee=X[X.length-1],re=ee?ee.children.indexOf(K):void 0;return B(K,re,ee)}}function mk(g,_){let E={type:"element",tagName:"blockquote",properties:{},children:g.wrap(g.all(_),!0)};return g.patch(_,E),g.applyData(_,E)}function fk(g,_){let E={type:"element",tagName:"br",properties:{},children:[]};return g.patch(_,E),[g.applyData(_,E),{type:"text",value:`
|
|
108
|
+
`}]}function hk(g,_){let E=_.value?_.value+`
|
|
109
|
+
`:"",T={},R=_.lang?_.lang.split(/\s+/):[];if(R.length>0)T.className=["language-"+R[0]];let w={type:"element",tagName:"code",properties:T,children:[{type:"text",value:E}]};if(_.meta)w.data={meta:_.meta};return g.patch(_,w),w=g.applyData(_,w),w={type:"element",tagName:"pre",properties:{},children:[w]},g.patch(_,w),w}function gk(g,_){let E={type:"element",tagName:"del",properties:{},children:g.all(_)};return g.patch(_,E),g.applyData(_,E)}function bk(g,_){let E={type:"element",tagName:"em",properties:{},children:g.all(_)};return g.patch(_,E),g.applyData(_,E)}function Sk(g,_){let E=typeof g.options.clobberPrefix==="string"?g.options.clobberPrefix:"user-content-",T=String(_.identifier).toUpperCase(),R=So(T.toLowerCase()),w=g.footnoteOrder.indexOf(T),B,Z=g.footnoteCounts.get(T);if(Z===void 0)Z=0,g.footnoteOrder.push(T),B=g.footnoteOrder.length;else B=w+1;Z+=1,g.footnoteCounts.set(T,Z);let K={type:"element",tagName:"a",properties:{href:"#"+E+"fn-"+R,id:E+"fnref-"+R+(Z>1?"-"+Z:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(B)}]};g.patch(_,K);let X={type:"element",tagName:"sup",properties:{},children:[K]};return g.patch(_,X),g.applyData(_,X)}function _k(g,_){let E={type:"element",tagName:"h"+_.depth,properties:{},children:g.all(_)};return g.patch(_,E),g.applyData(_,E)}function Ek(g,_){if(g.options.allowDangerousHtml){let E={type:"raw",value:_.value};return g.patch(_,E),g.applyData(_,E)}return}function ff(g,_){let E=_.referenceType,T="]";if(E==="collapsed")T+="[]";else if(E==="full")T+="["+(_.label||_.identifier)+"]";if(_.type==="imageReference")return[{type:"text",value:"!["+_.alt+T}];let R=g.all(_),w=R[0];if(w&&w.type==="text")w.value="["+w.value;else R.unshift({type:"text",value:"["});let B=R[R.length-1];if(B&&B.type==="text")B.value+=T;else R.push({type:"text",value:T});return R}function Tk(g,_){let E=String(_.identifier).toUpperCase(),T=g.definitionById.get(E);if(!T)return ff(g,_);let R={src:So(T.url||""),alt:_.alt};if(T.title!==null&&T.title!==void 0)R.title=T.title;let w={type:"element",tagName:"img",properties:R,children:[]};return g.patch(_,w),g.applyData(_,w)}function yk(g,_){let E={src:So(_.url)};if(_.alt!==null&&_.alt!==void 0)E.alt=_.alt;if(_.title!==null&&_.title!==void 0)E.title=_.title;let T={type:"element",tagName:"img",properties:E,children:[]};return g.patch(_,T),g.applyData(_,T)}function vk(g,_){let E={type:"text",value:_.value.replace(/\r?\n|\r/g," ")};g.patch(_,E);let T={type:"element",tagName:"code",properties:{},children:[E]};return g.patch(_,T),g.applyData(_,T)}function xk(g,_){let E=String(_.identifier).toUpperCase(),T=g.definitionById.get(E);if(!T)return ff(g,_);let R={href:So(T.url||"")};if(T.title!==null&&T.title!==void 0)R.title=T.title;let w={type:"element",tagName:"a",properties:R,children:g.all(_)};return g.patch(_,w),g.applyData(_,w)}function Rk(g,_){let E={href:So(_.url)};if(_.title!==null&&_.title!==void 0)E.title=_.title;let T={type:"element",tagName:"a",properties:E,children:g.all(_)};return g.patch(_,T),g.applyData(_,T)}function kk(g,_,E){let T=g.all(_),R=E?F6(E):Ik(_),w={},B=[];if(typeof _.checked==="boolean"){let ee=T[0],re;if(ee&&ee.type==="element"&&ee.tagName==="p")re=ee;else re={type:"element",tagName:"p",properties:{},children:[]},T.unshift(re);if(re.children.length>0)re.children.unshift({type:"text",value:" "});re.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:_.checked,disabled:!0},children:[]}),w.className=["task-list-item"]}let Z=-1;while(++Z<T.length){let ee=T[Z];if(R||Z!==0||ee.type!=="element"||ee.tagName!=="p")B.push({type:"text",value:`
|
|
110
|
+
`});if(ee.type==="element"&&ee.tagName==="p"&&!R)B.push(...ee.children);else B.push(ee)}let K=T[T.length-1];if(K&&(R||K.type!=="element"||K.tagName!=="p"))B.push({type:"text",value:`
|
|
111
|
+
`});let X={type:"element",tagName:"li",properties:w,children:B};return g.patch(_,X),g.applyData(_,X)}function F6(g){let _=!1;if(g.type==="list"){_=g.spread||!1;let E=g.children,T=-1;while(!_&&++T<E.length)_=Ik(E[T])}return _}function Ik(g){let _=g.spread;return _===null||_===void 0?g.children.length>1:_}function Ck(g,_){let E={},T=g.all(_),R=-1;if(typeof _.start==="number"&&_.start!==1)E.start=_.start;while(++R<T.length){let B=T[R];if(B.type==="element"&&B.tagName==="li"&&B.properties&&Array.isArray(B.properties.className)&&B.properties.className.includes("task-list-item")){E.className=["contains-task-list"];break}}let w={type:"element",tagName:_.ordered?"ol":"ul",properties:E,children:g.wrap(T,!0)};return g.patch(_,w),g.applyData(_,w)}function wk(g,_){let E={type:"element",tagName:"p",properties:{},children:g.all(_)};return g.patch(_,E),g.applyData(_,E)}function Ak(g,_){let E={type:"root",children:g.wrap(g.all(_))};return g.patch(_,E),g.applyData(_,E)}function Pk(g,_){let E={type:"element",tagName:"strong",properties:{},children:g.all(_)};return g.patch(_,E),g.applyData(_,E)}function zk(g,_){let E=g.all(_),T=E.shift(),R=[];if(T){let B={type:"element",tagName:"thead",properties:{},children:g.wrap([T],!0)};g.patch(_.children[0],B),R.push(B)}if(E.length>0){let B={type:"element",tagName:"tbody",properties:{},children:g.wrap(E,!0)},Z=Fr(_.children[1]),K=Fs(_.children[_.children.length-1]);if(Z&&K)B.position={start:Z,end:K};R.push(B)}let w={type:"element",tagName:"table",properties:{},children:g.wrap(R,!0)};return g.patch(_,w),g.applyData(_,w)}function Nk(g,_,E){let T=E?E.children:void 0,w=(T?T.indexOf(_):1)===0?"th":"td",B=E&&E.type==="table"?E.align:void 0,Z=B?B.length:_.children.length,K=-1,X=[];while(++K<Z){let re=_.children[K],ie={},se=B?B[K]:void 0;if(se)ie.align=se;let ae={type:"element",tagName:w,properties:ie,children:[]};if(re)ae.children=g.all(re),g.patch(re,ae),ae=g.applyData(re,ae);X.push(ae)}let ee={type:"element",tagName:"tr",properties:{},children:g.wrap(X,!0)};return g.patch(_,ee),g.applyData(_,ee)}function Ok(g,_){let E={type:"element",tagName:"td",properties:{},children:g.all(_)};return g.patch(_,E),g.applyData(_,E)}function Lk(g){let _=String(g),E=/\r?\n|\r/g,T=E.exec(_),R=0,w=[];while(T)w.push(Mk(_.slice(R,T.index),R>0,!0),T[0]),R=T.index+T[0].length,T=E.exec(_);return w.push(Mk(_.slice(R),R>0,!1)),w.join("")}function Mk(g,_,E){let T=0,R=g.length;if(_){let w=g.codePointAt(T);while(w===9||w===32)T++,w=g.codePointAt(T)}if(E){let w=g.codePointAt(R-1);while(w===9||w===32)R--,w=g.codePointAt(R-1)}return R>T?g.slice(T,R):""}function Dk(g,_){let E={type:"text",value:Lk(String(_.value))};return g.patch(_,E),g.applyData(_,E)}function $k(g,_){let E={type:"element",tagName:"hr",properties:{},children:[]};return g.patch(_,E),g.applyData(_,E)}var Uk={blockquote:mk,break:fk,code:hk,delete:gk,emphasis:bk,footnoteReference:Sk,heading:_k,html:Ek,imageReference:Tk,image:yk,inlineCode:vk,linkReference:xk,link:Rk,listItem:kk,list:Ck,paragraph:wk,root:Ak,strong:Pk,table:zk,tableCell:Ok,tableRow:Nk,text:Dk,thematicBreak:$k,toml:hf,yaml:hf,definition:hf,footnoteDefinition:hf};function hf(){return}var fb={}.hasOwnProperty,B6={};function Bk(g,_){let E=_||B6,T=new Map,R=new Map,w=new Map,B={...Uk,...E.handlers},Z={all:X,applyData:q6,definitionById:T,footnoteById:R,footnoteCounts:w,footnoteOrder:[],handlers:B,one:K,options:E,patch:H6,wrap:Z6};return Ti(g,function(ee){if(ee.type==="definition"||ee.type==="footnoteDefinition"){let re=ee.type==="definition"?T:R,ie=String(ee.identifier).toUpperCase();if(!re.has(ie))re.set(ie,ee)}}),Z;function K(ee,re){let ie=ee.type,se=Z.handlers[ie];if(fb.call(Z.handlers,ie)&&se)return se(Z,ee,re);if(Z.options.passThrough&&Z.options.passThrough.includes(ie)){if("children"in ee){let{children:fe,...xe}=ee,Ee=Ei(xe);return Ee.children=Z.all(ee),Ee}return Ei(ee)}return(Z.options.unknownHandler||j6)(Z,ee,re)}function X(ee){let re=[];if("children"in ee){let ie=ee.children,se=-1;while(++se<ie.length){let ae=Z.one(ie[se],ee);if(ae){if(se&&ie[se-1].type==="break"){if(!Array.isArray(ae)&&ae.type==="text")ae.value=Fk(ae.value);if(!Array.isArray(ae)&&ae.type==="element"){let fe=ae.children[0];if(fe&&fe.type==="text")fe.value=Fk(fe.value)}}if(Array.isArray(ae))re.push(...ae);else re.push(ae)}}}return re}}function H6(g,_){if(g.position)_.position=H0(g)}function q6(g,_){let E=_;if(g&&g.data){let T=g.data.hName,R=g.data.hChildren,w=g.data.hProperties;if(typeof T==="string")if(E.type==="element")E.tagName=T;else{let B="children"in E?E.children:[E];E={type:"element",tagName:T,properties:{},children:B}}if(E.type==="element"&&w)Object.assign(E.properties,Ei(w));if("children"in E&&E.children&&R!==null&&R!==void 0)E.children=R}return E}function j6(g,_){let E=_.data||{},T="value"in _&&!(fb.call(E,"hProperties")||fb.call(E,"hChildren"))?{type:"text",value:_.value}:{type:"element",tagName:"div",properties:{},children:g.all(_)};return g.patch(_,T),g.applyData(_,T)}function Z6(g,_){let E=[],T=-1;if(_)E.push({type:"text",value:`
|
|
112
|
+
`});while(++T<g.length){if(T)E.push({type:"text",value:`
|
|
113
|
+
`});E.push(g[T])}if(_&&g.length>0)E.push({type:"text",value:`
|
|
114
|
+
`});return E}function Fk(g){let _=0,E=g.charCodeAt(_);while(E===9||E===32)_++,E=g.charCodeAt(_);return g.slice(_)}function gf(g,_){let E=Bk(g,_),T=E.one(g,void 0),R=lk(E),w=Array.isArray(T)?{type:"root",children:T}:T||{type:"root",children:[]};if(R)gn("children"in w),w.children.push({type:"text",value:`
|
|
115
|
+
`},R);return w}function bf(g,_){if(g&&"run"in g)return async function(E,T){let R=gf(E,{file:T,..._});await g.run(R,T)};return function(E,T){return gf(E,{file:T,...g||_})}}function hb(g){if(g)throw g}var Ef=dt(Kk(),1);function yd(g){if(typeof g!=="object"||g===null)return!1;let _=Object.getPrototypeOf(g);return(_===null||_===Object.prototype||Object.getPrototypeOf(_)===null)&&!(Symbol.toStringTag in g)&&!(Symbol.iterator in g)}function gb(){let g=[],_={run:E,use:T};return _;function E(...R){let w=-1,B=R.pop();if(typeof B!=="function")throw TypeError("Expected function as last argument, not "+B);Z(null,...R);function Z(K,...X){let ee=g[++w],re=-1;if(K){B(K);return}while(++re<R.length)if(X[re]===null||X[re]===void 0)X[re]=R[re];if(R=X,ee)Jk(ee,Z)(...X);else B(null,...X)}}function T(R){if(typeof R!=="function")throw TypeError("Expected `middelware` to be a function, not "+R);return g.push(R),_}}function Jk(g,_){let E;return T;function T(...B){let Z=g.length>B.length,K;if(Z)B.push(R);try{K=g.apply(this,B)}catch(X){let ee=X;if(Z&&E)throw ee;return R(ee)}if(!Z)if(K&&K.then&&typeof K.then==="function")K.then(w,R);else if(K instanceof Error)R(K);else w(K)}function R(B,...Z){if(!E)E=!0,_(B,...Z)}function w(B){R(null,B)}}var xo={basename:V6,dirname:G6,extname:Y6,join:W6,sep:"/"};function V6(g,_){if(_!==void 0&&typeof _!=="string")throw TypeError('"ext" argument must be a string');vd(g);let E=0,T=-1,R=g.length,w;if(_===void 0||_.length===0||_.length>g.length){while(R--)if(g.codePointAt(R)===47){if(w){E=R+1;break}}else if(T<0)w=!0,T=R+1;return T<0?"":g.slice(E,T)}if(_===g)return"";let B=-1,Z=_.length-1;while(R--)if(g.codePointAt(R)===47){if(w){E=R+1;break}}else{if(B<0)w=!0,B=R+1;if(Z>-1)if(g.codePointAt(R)===_.codePointAt(Z--)){if(Z<0)T=R}else Z=-1,T=B}if(E===T)T=B;else if(T<0)T=g.length;return g.slice(E,T)}function G6(g){if(vd(g),g.length===0)return".";let _=-1,E=g.length,T;while(--E)if(g.codePointAt(E)===47){if(T){_=E;break}}else if(!T)T=!0;return _<0?g.codePointAt(0)===47?"/":".":_===1&&g.codePointAt(0)===47?"//":g.slice(0,_)}function Y6(g){vd(g);let _=g.length,E=-1,T=0,R=-1,w=0,B;while(_--){let Z=g.codePointAt(_);if(Z===47){if(B){T=_+1;break}continue}if(E<0)B=!0,E=_+1;if(Z===46){if(R<0)R=_;else if(w!==1)w=1}else if(R>-1)w=-1}if(R<0||E<0||w===0||w===1&&R===E-1&&R===T+1)return"";return g.slice(R,E)}function W6(...g){let _=-1,E;while(++_<g.length)if(vd(g[_]),g[_])E=E===void 0?g[_]:E+"/"+g[_];return E===void 0?".":K6(E)}function K6(g){vd(g);let _=g.codePointAt(0)===47,E=J6(g,!_);if(E.length===0&&!_)E=".";if(E.length>0&&g.codePointAt(g.length-1)===47)E+="/";return _?"/"+E:E}function J6(g,_){let E="",T=0,R=-1,w=0,B=-1,Z,K;while(++B<=g.length){if(B<g.length)Z=g.codePointAt(B);else if(Z===47)break;else Z=47;if(Z===47){if(R===B-1||w===1);else if(R!==B-1&&w===2){if(E.length<2||T!==2||E.codePointAt(E.length-1)!==46||E.codePointAt(E.length-2)!==46){if(E.length>2){if(K=E.lastIndexOf("/"),K!==E.length-1){if(K<0)E="",T=0;else E=E.slice(0,K),T=E.length-1-E.lastIndexOf("/");R=B,w=0;continue}}else if(E.length>0){E="",T=0,R=B,w=0;continue}}if(_)E=E.length>0?E+"/..":"..",T=2}else{if(E.length>0)E+="/"+g.slice(R+1,B);else E=g.slice(R+1,B);T=B-R-1}R=B,w=0}else if(Z===46&&w>-1)w++;else w=-1}return E}function vd(g){if(typeof g!=="string")throw TypeError("Path must be a string. Received "+JSON.stringify(g))}var Xk={cwd:X6};function X6(){return"/"}function Qa(g){return Boolean(g!==null&&typeof g==="object"&&"href"in g&&g.href&&"protocol"in g&&g.protocol&&g.auth===void 0)}function Qk(g){if(typeof g==="string")g=new URL(g);else if(!Qa(g)){let _=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+g+"`");throw _.code="ERR_INVALID_ARG_TYPE",_}if(g.protocol!=="file:"){let _=TypeError("The URL must be of scheme file");throw _.code="ERR_INVALID_URL_SCHEME",_}return Q6(g)}function Q6(g){if(g.hostname!==""){let T=TypeError('File URL host must be "localhost" or empty on darwin');throw T.code="ERR_INVALID_FILE_URL_HOST",T}let _=g.pathname,E=-1;while(++E<_.length)if(_.codePointAt(E)===37&&_.codePointAt(E+1)===50){let T=_.codePointAt(E+2);if(T===70||T===102){let R=TypeError("File URL path must not include encoded / characters");throw R.code="ERR_INVALID_FILE_URL_PATH",R}}return decodeURIComponent(_)}var bb=["history","path","basename","stem","extname","dirname"];class eu{constructor(g){let _;if(!g)_={};else if(Qa(g))_={path:g};else if(typeof g==="string"||e$(g))_={value:g};else _=g;this.cwd="cwd"in _?"":Xk.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let E=-1;while(++E<bb.length){let R=bb[E];if(R in _&&_[R]!==void 0&&_[R]!==null)this[R]=R==="history"?[..._[R]]:_[R]}let T;for(T in _)if(!bb.includes(T))this[T]=_[T]}get basename(){return typeof this.path==="string"?xo.basename(this.path):void 0}set basename(g){_b(g,"basename"),Sb(g,"basename"),this.path=xo.join(this.dirname||"",g)}get dirname(){return typeof this.path==="string"?xo.dirname(this.path):void 0}set dirname(g){eI(this.basename,"dirname"),this.path=xo.join(g||"",this.basename)}get extname(){return typeof this.path==="string"?xo.extname(this.path):void 0}set extname(g){if(Sb(g,"extname"),eI(this.dirname,"extname"),g){if(g.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(g.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=xo.join(this.dirname,this.stem+(g||""))}get path(){return this.history[this.history.length-1]}set path(g){if(Qa(g))g=Qk(g);if(_b(g,"path"),this.path!==g)this.history.push(g)}get stem(){return typeof this.path==="string"?xo.basename(this.path,this.extname):void 0}set stem(g){_b(g,"stem"),Sb(g,"stem"),this.path=xo.join(this.dirname||"",g+(this.extname||""))}fail(g,_,E){let T=this.message(g,_,E);throw T.fatal=!0,T}info(g,_,E){let T=this.message(g,_,E);return T.fatal=void 0,T}message(g,_,E){let T=new Vn(g,_,E);if(this.path)T.name=this.path+":"+T.name,T.file=this.path;return T.fatal=!1,this.messages.push(T),T}toString(g){if(this.value===void 0)return"";if(typeof this.value==="string")return this.value;return new TextDecoder(g||void 0).decode(this.value)}}function Sb(g,_){if(g&&g.includes(xo.sep))throw Error("`"+_+"` cannot be a path: did not expect `"+xo.sep+"`")}function _b(g,_){if(!g)throw Error("`"+_+"` cannot be empty")}function eI(g,_){if(!g)throw Error("Setting `"+_+"` requires `path` to be set too")}function e$(g){return Boolean(g&&typeof g==="object"&&"byteLength"in g&&"byteOffset"in g)}var tI=function(g){let T=this.constructor.prototype,R=T[g],w=function(){return R.apply(w,arguments)};return Object.setPrototypeOf(w,T),w};var t$={}.hasOwnProperty;class vb extends tI{constructor(){super("copy");this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=gb()}copy(){let g=new vb,_=-1;while(++_<this.attachers.length){let E=this.attachers[_];g.use(...E)}return g.data(Ef.default(!0,{},this.namespace)),g}data(g,_){if(typeof g==="string"){if(arguments.length===2)return yb("data",this.frozen),this.namespace[g]=_,this;return t$.call(this.namespace,g)&&this.namespace[g]||void 0}if(g)return yb("data",this.frozen),this.namespace=g,this;return this.namespace}freeze(){if(this.frozen)return this;let g=this;while(++this.freezeIndex<this.attachers.length){let[_,...E]=this.attachers[this.freezeIndex];if(E[0]===!1)continue;if(E[0]===!0)E[0]=void 0;let T=_.call(g,...E);if(typeof T==="function")this.transformers.use(T)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(g){this.freeze();let _=_f(g),E=this.parser||this.Parser;return Eb("parse",E),E(String(_),_)}process(g,_){let E=this;return this.freeze(),Eb("process",this.parser||this.Parser),Tb("process",this.compiler||this.Compiler),_?T(void 0,_):new Promise(T);function T(R,w){let B=_f(g),Z=E.parse(B);E.run(Z,B,function(X,ee,re){if(X||!ee||!re)return K(X);let ie=ee,se=E.stringify(ie,re);if(r$(se))re.value=se;else re.result=se;K(X,re)});function K(X,ee){if(X||!ee)w(X);else if(R)R(ee);else gn(_,"`done` is defined if `resolve` is not"),_(void 0,ee)}}}processSync(g){let _=!1,E;return this.freeze(),Eb("processSync",this.parser||this.Parser),Tb("processSync",this.compiler||this.Compiler),this.process(g,T),rI("processSync","process",_),gn(E,"we either bailed on an error or have a tree"),E;function T(R,w){_=!0,hb(R),E=w}}run(g,_,E){nI(g),this.freeze();let T=this.transformers;if(!E&&typeof _==="function")E=_,_=void 0;return E?R(void 0,E):new Promise(R);function R(w,B){gn(typeof _!=="function","`file` can’t be a `done` anymore, we checked");let Z=_f(_);T.run(g,Z,K);function K(X,ee,re){let ie=ee||g;if(X)B(X);else if(w)w(ie);else gn(E,"`done` is defined if `resolve` is not"),E(void 0,ie,re)}}}runSync(g,_){let E=!1,T;return this.run(g,_,R),rI("runSync","run",E),gn(T,"we either bailed on an error or have a tree"),T;function R(w,B){hb(w),T=B,E=!0}}stringify(g,_){this.freeze();let E=_f(_),T=this.compiler||this.Compiler;return Tb("stringify",T),nI(g),T(g,E)}use(g,..._){let E=this.attachers,T=this.namespace;if(yb("use",this.frozen),g===null||g===void 0);else if(typeof g==="function")Z(g,_);else if(typeof g==="object")if(Array.isArray(g))B(g);else w(g);else throw TypeError("Expected usable value, not `"+g+"`");return this;function R(K){if(typeof K==="function")Z(K,[]);else if(typeof K==="object")if(Array.isArray(K)){let[X,...ee]=K;Z(X,ee)}else w(K);else throw TypeError("Expected usable value, not `"+K+"`")}function w(K){if(!("plugins"in K)&&!("settings"in K))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");if(B(K.plugins),K.settings)T.settings=Ef.default(!0,T.settings,K.settings)}function B(K){let X=-1;if(K===null||K===void 0);else if(Array.isArray(K))while(++X<K.length){let ee=K[X];R(ee)}else throw TypeError("Expected a list of plugins, not `"+K+"`")}function Z(K,X){let ee=-1,re=-1;while(++ee<E.length)if(E[ee][0]===K){re=ee;break}if(re===-1)E.push([K,...X]);else if(X.length>0){let[ie,...se]=X,ae=E[re][1];if(yd(ae)&&yd(ie))ie=Ef.default(!0,ae,ie);E[re]=[K,ie,...se]}}}}var xb=new vb().freeze();function Eb(g,_){if(typeof _!=="function")throw TypeError("Cannot `"+g+"` without `parser`")}function Tb(g,_){if(typeof _!=="function")throw TypeError("Cannot `"+g+"` without `compiler`")}function yb(g,_){if(_)throw Error("Cannot call `"+g+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nI(g){if(!yd(g)||typeof g.type!=="string")throw TypeError("Expected node, got `"+g+"`")}function rI(g,_,E){if(!E)throw Error("`"+g+"` finished async. Use `"+_+"` instead")}function _f(g){return n$(g)?g:new eu(g)}function n$(g){return Boolean(g&&typeof g==="object"&&"message"in g&&"messages"in g)}function r$(g){return typeof g==="string"||o$(g)}function o$(g){return Boolean(g&&typeof g==="object"&&"byteLength"in g&&"byteOffset"in g)}var i$="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",oI=[],iI={allowDangerousHtml:!0},s$=/^(https?|ircs?|mailto|xmpp)$/i,a$=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Rb(g){let _=u$(g),E=c$(g);return l$(_.runSync(_.parse(E),E),g)}function u$(g){let _=g.rehypePlugins||oI,E=g.remarkPlugins||oI,T=g.remarkRehypeOptions?{...g.remarkRehypeOptions,...iI}:iI;return xb().use(sf).use(E).use(bf,T).use(_)}function c$(g){let _=g.children||"",E=new eu;if(typeof _==="string")E.value=_;else Bm("Unexpected value `"+_+"` for `children` prop, expected `string`");return E}function l$(g,_){let{allowedElements:E,allowElement:T,components:R,disallowedElements:w,skipHtml:B,unwrapDisallowed:Z}=_,K=_.urlTransform||sI;for(let ee of a$)if(Object.hasOwn(_,ee.from))Bm("Unexpected `"+ee.from+"` prop, "+(ee.to?"use `"+ee.to+"` instead":"remove it")+" (see <"+i$+"#"+ee.id+"> for more info)");if(E&&w)Bm("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other");return Ti(g,X),Z0(g,{Fragment:F,components:R,ignoreInvalidStyle:!0,jsx:e,jsxs:t,passKeys:!0,passNode:!0});function X(ee,re,ie){if(ee.type==="raw"&&ie&&typeof re==="number"){if(B)ie.children.splice(re,1);else ie.children[re]={type:"text",value:ee.value};return re}if(ee.type==="element"){let se;for(se in cd)if(Object.hasOwn(cd,se)&&Object.hasOwn(ee.properties,se)){let ae=ee.properties[se],fe=cd[se];if(fe===null||fe.includes(ee.tagName))ee.properties[se]=K(String(ae||""),se,ee)}}if(ee.type==="element"){let se=E?!E.includes(ee.tagName):w?w.includes(ee.tagName):!1;if(!se&&T&&typeof re==="number")se=!T(ee,re,ie);if(se&&ie&&typeof re==="number"){if(Z&&ee.children)ie.children.splice(re,1,...ee.children);else ie.children.splice(re,1);return re}}}}function sI(g){let _=g.indexOf(":"),E=g.indexOf("?"),T=g.indexOf("#"),R=g.indexOf("/");if(_===-1||R!==-1&&_>R||E!==-1&&_>E||T!==-1&&_>T||s$.test(g.slice(0,_)))return g;return""}var aI=/[#.]/g;function kb(g,_){let E=g||"",T={},R=0,w,B;while(R<E.length){aI.lastIndex=R;let Z=aI.exec(E),K=E.slice(R,Z?Z.index:E.length);if(K){if(!w)B=K;else if(w==="#")T.id=K;else if(Array.isArray(T.className))T.className.push(K);else T.className=[K];R+=K.length}if(Z)w=Z[0],R++}return{type:"element",tagName:B||_||"div",properties:T,children:[]}}function Cb(g,_,E){let T=E?f$(E):void 0;function R(w,B,...Z){let K;if(w===null||w===void 0){K={type:"root",children:[]};let X=B;Z.unshift(X)}else{K=kb(w,_);let X=K.tagName.toLowerCase(),ee=T?T.get(X):void 0;if(K.tagName=ee||X,d$(B))Z.unshift(B);else for(let[re,ie]of Object.entries(B))p$(g,K.properties,re,ie)}for(let X of Z)Ib(K.children,X);if(K.type==="element"&&K.tagName==="template")K.content={type:"root",children:K.children},K.children=[];return K}return R}function d$(g){if(g===null||typeof g!=="object"||Array.isArray(g))return!0;if(typeof g.type!=="string")return!1;let _=g,E=Object.keys(g);for(let T of E){let R=_[T];if(R&&typeof R==="object"){if(!Array.isArray(R))return!0;let w=R;for(let B of w)if(typeof B!=="number"&&typeof B!=="string")return!0}}if("children"in g&&Array.isArray(g.children))return!0;return!1}function p$(g,_,E,T){let R=Si(g,E),w;if(T===null||T===void 0)return;if(typeof T==="number"){if(Number.isNaN(T))return;w=T}else if(typeof T==="boolean")w=T;else if(typeof T==="string")if(R.spaceSeparated)w=U0(T);else if(R.commaSeparated)w=A0(T);else if(R.commaOrSpaceSeparated)w=U0(A0(T).join(" "));else w=uI(R,R.property,T);else if(Array.isArray(T))w=[...T];else w=R.property==="style"?m$(T):String(T);if(Array.isArray(w)){let B=[];for(let Z of w)B.push(uI(R,R.property,Z));w=B}if(R.property==="className"&&Array.isArray(_.className))w=_.className.concat(w);_[R.property]=w}function Ib(g,_){if(_===null||_===void 0);else if(typeof _==="number"||typeof _==="string")g.push({type:"text",value:String(_)});else if(Array.isArray(_))for(let E of _)Ib(g,E);else if(typeof _==="object"&&"type"in _)if(_.type==="root")Ib(g,_.children);else g.push(_);else throw Error("Expected node, nodes, or string, got `"+_+"`")}function uI(g,_,E){if(typeof E==="string"){if(g.number&&E&&!Number.isNaN(Number(E)))return Number(E);if((g.boolean||g.overloadedBoolean)&&(E===""||gi(E)===gi(_)))return!0}return E}function m$(g){let _=[];for(let[E,T]of Object.entries(g))_.push([E,T].join(": "));return _.join("; ")}function f$(g){let _=new Map;for(let E of g)_.set(E.toLowerCase(),E);return _}var cI=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"];var wb=Cb(_i,"div"),Ab=Cb(bo,"g",cI);function Pb(g){let _=String(g),E=[];return{toOffset:R,toPoint:T};function T(w){if(typeof w==="number"&&w>-1&&w<=_.length){let B=0;while(!0){let Z=E[B];if(Z===void 0){let K=lI(_,E[B-1]);Z=K===-1?_.length+1:K+1,E[B]=Z}if(Z>w)return{line:B+1,column:w-(B>0?E[B-1]:0)+1,offset:w};B++}}}function R(w){if(w&&typeof w.line==="number"&&typeof w.column==="number"&&!Number.isNaN(w.line)&&!Number.isNaN(w.column)){while(E.length<w.line){let Z=E[E.length-1],K=lI(_,Z),X=K===-1?_.length+1:K+1;if(Z===X)break;E.push(X)}let B=(w.line>1?E[w.line-2]:0)+w.column-1;if(B<E[w.line-1])return B}}}function lI(g,_){let E=g.indexOf("\r",_),T=g.indexOf(`
|
|
116
|
+
`,_);if(T===-1)return E;if(E===-1||E+1===T)return T;return E<T?E:T}var ti={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};var pI={}.hasOwnProperty,h$=Object.prototype;function zb(g,_){let E=_||{};return Nb({file:E.file||void 0,location:!1,schema:E.space==="svg"?bo:_i,verbose:E.verbose||!1},g)}function Nb(g,_){let E;switch(_.nodeName){case"#comment":{let T=_;return E={type:"comment",value:T.data},Tf(g,T,E),E}case"#document":case"#document-fragment":{let T=_,R="mode"in T?T.mode==="quirks"||T.mode==="limited-quirks":!1;if(E={type:"root",children:mI(g,_.childNodes),data:{quirksMode:R}},g.file&&g.location){let w=String(g.file),B=Pb(w),Z=B.toPoint(0),K=B.toPoint(w.length);gn(Z,"expected `start`"),gn(K,"expected `end`"),E.position={start:Z,end:K}}return E}case"#documentType":{let T=_;return E={type:"doctype"},Tf(g,T,E),E}case"#text":{let T=_;return E={type:"text",value:T.value},Tf(g,T,E),E}default:return E=g$(g,_),E}}function mI(g,_){let E=-1,T=[];while(++E<_.length){let R=Nb(g,_[E]);T.push(R)}return T}function g$(g,_){let E=g.schema;g.schema=_.namespaceURI===ti.svg?bo:_i;let T=-1,R={};while(++T<_.attrs.length){let Z=_.attrs[T],K=(Z.prefix?Z.prefix+":":"")+Z.name;if(!pI.call(h$,K))R[K]=Z.value}let B=(g.schema.space==="svg"?Ab:wb)(_.tagName,R,mI(g,_.childNodes));if(Tf(g,_,B),B.tagName==="template"){let Z=_,K=Z.sourceCodeLocation,X=K&&K.startTag&&tu(K.startTag),ee=K&&K.endTag&&tu(K.endTag),re=Nb(g,Z.content);if(X&&ee&&g.file)re.position={start:X.end,end:ee.start};B.content=re}return g.schema=E,B}function Tf(g,_,E){if("sourceCodeLocation"in _&&_.sourceCodeLocation&&g.file){let T=b$(g,E,_.sourceCodeLocation);if(T)g.location=!0,E.position=T}}function b$(g,_,E){let T=tu(E);if(_.type==="element"){let R=_.children[_.children.length-1];if(T&&!E.endTag&&R&&R.position&&R.position.end)T.end=Object.assign({},R.position.end);if(g.verbose){let w={},B;if(E.attrs){for(B in E.attrs)if(pI.call(E.attrs,B))w[Si(g.schema,B).property]=tu(E.attrs[B])}gn(E.startTag,"a start tag should exist");let Z=tu(E.startTag),K=E.endTag?tu(E.endTag):void 0,X={opening:Z};if(K)X.closing=K;X.properties=w,_.data={position:X}}}return T}function tu(g){let _=dI({line:g.startLine,column:g.startCol,offset:g.startOffset}),E=dI({line:g.endLine,column:g.endCol,offset:g.endOffset});return _||E?{start:_,end:E}:void 0}function dI(g){return g.line&&g.column?g:void 0}var fI={}.hasOwnProperty;function yf(g,_){let E=_||{};function T(R,...w){let{invalid:B,handlers:Z}=T;if(R&&fI.call(R,g)){let K=String(R[g]);B=fI.call(Z,K)?Z[K]:T.unknown}if(B)return B.call(this,R,...w)}return T.handlers=E.handlers||{},T.invalid=E.invalid,T.unknown=E.unknown,T}var S$={},_$={}.hasOwnProperty,hI=yf("type",{handlers:{root:E$,element:R$,text:v$,comment:x$,doctype:y$}});function Ob(g,_){let T=(_||S$).space;return hI(g,T==="svg"?bo:_i)}function E$(g,_){let E={nodeName:"#document",mode:(g.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return E.childNodes=Mb(g.children,E,_),nu(g,E),E}function T$(g,_){let E={nodeName:"#document-fragment",childNodes:[]};return E.childNodes=Mb(g.children,E,_),nu(g,E),E}function y$(g){let _={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return nu(g,_),_}function v$(g){let _={nodeName:"#text",value:g.value,parentNode:null};return nu(g,_),_}function x$(g){let _={nodeName:"#comment",data:g.value,parentNode:null};return nu(g,_),_}function R$(g,_){let E=_,T=E;if(g.type==="element"&&g.tagName.toLowerCase()==="svg"&&E.space==="html")T=bo;let R=[],w;if(g.properties){for(w in g.properties)if(w!=="children"&&_$.call(g.properties,w)){let K=k$(T,w,g.properties[w]);if(K)R.push(K)}}let B=T.space;gn(B);let Z={nodeName:g.tagName,tagName:g.tagName,attrs:R,namespaceURI:ti[B],childNodes:[],parentNode:null};if(Z.childNodes=Mb(g.children,Z,T),nu(g,Z),g.tagName==="template"&&g.content)Z.content=T$(g.content,T);return Z}function k$(g,_,E){let T=Si(g,_);if(E===!1||E===null||E===void 0||typeof E==="number"&&Number.isNaN(E)||!E&&T.boolean)return;if(Array.isArray(E))E=T.commaSeparated?Hm(E):Gm(E);let R={name:T.attribute,value:E===!0?"":String(E)};if(T.space&&T.space!=="html"&&T.space!=="svg"){let w=R.name.indexOf(":");if(w<0)R.prefix="";else R.name=R.name.slice(w+1),R.prefix=T.attribute.slice(0,w);R.namespace=ti[T.space]}return R}function Mb(g,_,E){let T=-1,R=[];if(g)while(++T<g.length){let w=hI(g[T],E);w.parentNode=_,R.push(w)}return R}function nu(g,_){let E=g.position;if(E&&E.start&&E.end)gn(typeof E.start.offset==="number"),gn(typeof E.end.offset==="number"),_.sourceCodeLocation={startLine:E.start.line,startCol:E.start.column,startOffset:E.start.offset,endLine:E.end.line,endCol:E.end.column,endOffset:E.end.offset}}var gI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var I$=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),In="�",ge;(function(g){g[g.EOF=-1]="EOF",g[g.NULL=0]="NULL",g[g.TABULATION=9]="TABULATION",g[g.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",g[g.LINE_FEED=10]="LINE_FEED",g[g.FORM_FEED=12]="FORM_FEED",g[g.SPACE=32]="SPACE",g[g.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",g[g.QUOTATION_MARK=34]="QUOTATION_MARK",g[g.AMPERSAND=38]="AMPERSAND",g[g.APOSTROPHE=39]="APOSTROPHE",g[g.HYPHEN_MINUS=45]="HYPHEN_MINUS",g[g.SOLIDUS=47]="SOLIDUS",g[g.DIGIT_0=48]="DIGIT_0",g[g.DIGIT_9=57]="DIGIT_9",g[g.SEMICOLON=59]="SEMICOLON",g[g.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",g[g.EQUALS_SIGN=61]="EQUALS_SIGN",g[g.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",g[g.QUESTION_MARK=63]="QUESTION_MARK",g[g.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",g[g.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",g[g.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",g[g.GRAVE_ACCENT=96]="GRAVE_ACCENT",g[g.LATIN_SMALL_A=97]="LATIN_SMALL_A",g[g.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(ge||(ge={}));var wr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function vf(g){return g>=55296&&g<=57343}function bI(g){return g>=56320&&g<=57343}function SI(g,_){return(g-55296)*1024+9216+_}function xf(g){return g!==32&&g!==10&&g!==13&&g!==9&&g!==12&&g>=1&&g<=31||g>=127&&g<=159}function Rf(g){return g>=64976&&g<=65007||I$.has(g)}var Le;(function(g){g.controlCharacterInInputStream="control-character-in-input-stream",g.noncharacterInInputStream="noncharacter-in-input-stream",g.surrogateInInputStream="surrogate-in-input-stream",g.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",g.endTagWithAttributes="end-tag-with-attributes",g.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",g.unexpectedSolidusInTag="unexpected-solidus-in-tag",g.unexpectedNullCharacter="unexpected-null-character",g.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",g.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",g.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",g.missingEndTagName="missing-end-tag-name",g.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",g.unknownNamedCharacterReference="unknown-named-character-reference",g.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",g.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",g.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",g.eofBeforeTagName="eof-before-tag-name",g.eofInTag="eof-in-tag",g.missingAttributeValue="missing-attribute-value",g.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",g.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",g.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",g.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",g.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",g.missingDoctypePublicIdentifier="missing-doctype-public-identifier",g.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",g.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",g.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",g.cdataInHtmlContent="cdata-in-html-content",g.incorrectlyOpenedComment="incorrectly-opened-comment",g.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",g.eofInDoctype="eof-in-doctype",g.nestedComment="nested-comment",g.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",g.eofInComment="eof-in-comment",g.incorrectlyClosedComment="incorrectly-closed-comment",g.eofInCdata="eof-in-cdata",g.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",g.nullCharacterReference="null-character-reference",g.surrogateCharacterReference="surrogate-character-reference",g.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",g.controlCharacterReference="control-character-reference",g.noncharacterCharacterReference="noncharacter-character-reference",g.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",g.missingDoctypeName="missing-doctype-name",g.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",g.duplicateAttribute="duplicate-attribute",g.nonConformingDoctype="non-conforming-doctype",g.missingDoctype="missing-doctype",g.misplacedDoctype="misplaced-doctype",g.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",g.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",g.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",g.openElementsLeftAfterEof="open-elements-left-after-eof",g.abandonedHeadElementChild="abandoned-head-element-child",g.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",g.nestedNoscriptInHead="nested-noscript-in-head",g.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(Le||(Le={}));var w$=65536;class Lb{constructor(g){this.handler=g,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=w$,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(g,_){let{line:E,col:T,offset:R}=this,w=T+_,B=R+_;return{code:g,startLine:E,endLine:E,startCol:w,endCol:w,startOffset:B,endOffset:B}}_err(g){if(this.handler.onParseError&&this.lastErrOffset!==this.offset)this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(g,0))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(g){if(this.pos!==this.html.length-1){let _=this.html.charCodeAt(this.pos+1);if(bI(_))return this.pos++,this._addGap(),SI(g,_)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,ge.EOF;return this._err(Le.surrogateInInputStream),g}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){if(this.willDropParsedChunk())this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0}write(g,_){if(this.html.length>0)this.html+=g;else this.html=g;this.endOfChunkHit=!1,this.lastChunkWritten=_}insertHtmlAtCurrentPos(g){this.html=this.html.substring(0,this.pos+1)+g+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(g,_){if(this.pos+g.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(_)return this.html.startsWith(g,this.pos);for(let E=0;E<g.length;E++)if((this.html.charCodeAt(this.pos+E)|32)!==g.charCodeAt(E))return!1;return!0}peek(g){let _=this.pos+g;if(_>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,ge.EOF;let E=this.html.charCodeAt(_);return E===ge.CARRIAGE_RETURN?ge.LINE_FEED:E}advance(){if(this.pos++,this.isEol)this.isEol=!1,this.line++,this.lineStartPos=this.pos;if(this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,ge.EOF;let g=this.html.charCodeAt(this.pos);if(g===ge.CARRIAGE_RETURN)return this.isEol=!0,this.skipNextNewLine=!0,ge.LINE_FEED;if(g===ge.LINE_FEED){if(this.isEol=!0,this.skipNextNewLine)return this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()}if(this.skipNextNewLine=!1,vf(g))g=this._processSurrogate(g);if(!(this.handler.onParseError===null||g>31&&g<127||g===ge.LINE_FEED||g===ge.CARRIAGE_RETURN||g>159&&g<64976))this._checkForProblematicCharacters(g);return g}_checkForProblematicCharacters(g){if(xf(g))this._err(Le.controlCharacterInInputStream);else if(Rf(g))this._err(Le.noncharacterInInputStream)}retreat(g){this.pos-=g;while(this.pos<this.lastGapPos)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var an;(function(g){g[g.CHARACTER=0]="CHARACTER",g[g.NULL_CHARACTER=1]="NULL_CHARACTER",g[g.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",g[g.START_TAG=3]="START_TAG",g[g.END_TAG=4]="END_TAG",g[g.COMMENT=5]="COMMENT",g[g.DOCTYPE=6]="DOCTYPE",g[g.EOF=7]="EOF",g[g.HIBERNATION=8]="HIBERNATION"})(an||(an={}));function kf(g,_){for(let E=g.attrs.length-1;E>=0;E--)if(g.attrs[E].name===_)return g.attrs[E].value;return null}var Db=new Uint16Array("ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\x00\x00\x00\x00\x00\x00ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀\uD835\uDD04rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀\uD835\uDD38plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀\uD835\uDC9Cign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀\uD835\uDD05pf;쀀\uD835\uDD39eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀\uD835\uDC9EpĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀\uD835\uDD07Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\x00\x00\x00͔͂\x00Ѕf;쀀\uD835\uDD3Bƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\x00\x00ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\x00\x00ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\x00ц\x00ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\x00ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀\uD835\uDC9Frok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀\uD835\uDD08rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\x00\x00ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀\uD835\uDD3Csilon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀\uD835\uDD09lledɓ֗\x00\x00֣mallSquare;旼erySmallSquare;斪Ͱֺ\x00ֿ\x00\x00ׄf;쀀\uD835\uDD3DAll;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀\uD835\uDD0A;拙pf;쀀\uD835\uDD3Eeater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀\uD835\uDCA2;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\x00ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\x00ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀\uD835\uDD40a;䎙cr;愐ilde;䄨ǫޚ\x00ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀\uD835\uDD0Dpf;쀀\uD835\uDD41ǣ߇\x00ߌr;쀀\uD835\uDCA5rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀\uD835\uDD0Epf;쀀\uD835\uDD42cr;쀀\uD835\uDCA6րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\x00ࣃbleBracket;柦nǔࣈ\x00࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀\uD835\uDD0FĀ;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀\uD835\uDD43erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀\uD835\uDD10nusPlus;戓pf;쀀\uD835\uDD44cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀\uD835\uDD11ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀\uD835\uDCA9ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀\uD835\uDD12rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀\uD835\uDD46enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀\uD835\uDCAAash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀\uD835\uDD13i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀\uD835\uDCAB;䎨ȀUfos༑༖༛༟OT耻\"䀢r;쀀\uD835\uDD14pf;愚cr;쀀\uD835\uDCACBEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\x00စbleBracket;柧nǔည\x00နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀\uD835\uDD16ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀\uD835\uDD4Aɲᅭ\x00\x00ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀\uD835\uDCAEar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀\uD835\uDD17ĀeiቻDzኀ\x00ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀\uD835\uDD4BipleDot;惛Āctዖዛr;쀀\uD835\uDCAFrok;䅦ૡዷጎጚጦ\x00ጬጱ\x00\x00\x00\x00\x00ጸጽ፷ᎅ\x00ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\x00y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀\uD835\uDD18rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀\uD835\uDD4CЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀\uD835\uDCB0ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀\uD835\uDD19pf;쀀\uD835\uDD4Dcr;쀀\uD835\uDCB1dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀\uD835\uDD1Apf;쀀\uD835\uDD4Ecr;쀀\uD835\uDCB2Ȁfiosᓋᓐᓒᓘr;쀀\uD835\uDD1B;䎞pf;쀀\uD835\uDD4Fcr;쀀\uD835\uDCB3ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀\uD835\uDD1Cpf;쀀\uD835\uDD50cr;쀀\uD835\uDCB4ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\x00ᕛoWidtèa;䎖r;愨pf;愤cr;쀀\uD835\uDCB5ᖃᖊᖐ\x00ᖰᖶᖿ\x00\x00\x00\x00ᗆᗛᗫᙟ᙭\x00ᚕ᚛ᚲᚹ\x00ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀\uD835\uDD1Erave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\x00\x00ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀\uD835\uDD52;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀\uD835\uDCB6;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀\uD835\uDD1Fgcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\x00\x00ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\x00ᠳƲᠯ\x00ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀\uD835\uDD53Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀\uD835\uDCB7mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\x00᧨ᨑᨕᨲ\x00ᨷᩐ\x00\x00᪴\x00\x00᫁\x00\x00ᬡᬮ᭒\x00᯽\x00ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\x00᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀\uD835\uDD20ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\x00\x00᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\x00ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\x00\x00aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\x00ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀\uD835\uDD54oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀\uD835\uDCB8Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\x00\x00᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\x00\x00ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀\uD835\uDD21arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\x00\x00ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀\uD835\uDD55ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\x00\x00ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀\uD835\uDCB9;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀\uD835\uDD22ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀\uD835\uDD56ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\x00\x00ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\x00ᾞ\x00ᾡᾧ\x00\x00ῆῌ\x00ΐ\x00ῦῪ \x00 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\x00\x00᾽g;耀ffig;耀ffl;쀀\uD835\uDD23lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\x00ῳf;쀀\uD835\uDD57ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\x00⁐β•‥‧\x00耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\x00‶;慔;慖ʴ‾⁁\x00\x00⁃耻¾䂾;慗;慜5;慘ƶ⁌\x00⁎;慚;慝8;慞l;恄wn;挢cr;쀀\uD835\uDCBBࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀\uD835\uDD24Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀\uD835\uDD58Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\x00proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀\uD835\uDD25sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀\uD835\uDD59bar;怕ƀclt≯≴≸r;쀀\uD835\uDCBDasè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\x00⊪\x00⊸⋅⋎\x00⋕⋳\x00\x00⋸⌢⍧⍢⍿\x00⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀\uD835\uDD26rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀\uD835\uDD5Aa;䎹uest耻¿䂿Āci⎊⎏r;쀀\uD835\uDCBEnʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\x00⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀\uD835\uDD27ath;䈷pf;쀀\uD835\uDD5Bǣ⏬\x00⏱r;쀀\uD835\uDCBFrcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀\uD835\uDD28reen;䄸cy;䑅cy;䑜pf;쀀\uD835\uDD5Ccr;쀀\uD835\uDCC0ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\x00⒪\x00⒱\x00\x00\x00\x00\x00⒵Ⓔ\x00ⓆⓈⓍ\x00⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀\uD835\uDD29Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀\uD835\uDD5Dus;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀\uD835\uDCC1mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀\uD835\uDD2Ao;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀\uD835\uDD5EĀct⣸⣽r;쀀\uD835\uDCC2pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\x00⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\x00⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀\uD835\uDD2BȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀\uD835\uDD5F膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀\uD835\uDCC3ortɭ⬅\x00\x00⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00ⴭ\x00ⴸⵈⵠⵥⶄᬇ\x00\x00ⶍⶫ\x00ⷈⷎ\x00ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀\uD835\uDD2Cͯ\x00\x00\x00ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀\uD835\uDD60ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\x00\x00⺀⺝\x00⺢⺹\x00\x00⻋ຜ\x00⼓\x00\x00⼫⾼\x00⿈rȀ;astЃ脀¶;l䂶leìЃɩ\x00\x00m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀\uD835\uDD2Dƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀\uD835\uDD61nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀\uD835\uDCC5;䏈ncsp;怈̀fiopsu⋢⿱r;쀀\uD835\uDD2Epf;쀀\uD835\uDD62rime;恗cr;쀀\uD835\uDCC6ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀\uD835\uDD2FĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀\uD835\uDD63us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀\uD835\uDCC7Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\x00㍺㎤\x00\x00㏬㏰\x00㐨㑈㑚㒭㒱㓊㓱\x00㘖\x00\x00㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\x00㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀\uD835\uDD30Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\x00\x00㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀\uD835\uDD64aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀\uD835\uDCC8tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\x00㙾㛂\x00\x00\x00\x00\x00㛛㜃\x00㜉㝬\x00\x00\x00㞇ɲ㙖\x00\x00㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀\uD835\uDD31Ȁeiko㚆㚝㚵㚼Dz㚋\x00㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀\uD835\uDD65rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀\uD835\uDCC9;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\x00㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀\uD835\uDD32rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\x00\x00㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀\uD835\uDD66̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\x00\x00㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀\uD835\uDCCAƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀\uD835\uDD33tré㦮suĀbp㧯㧱»ജ»൙pf;쀀\uD835\uDD67roðtré㦴Ācu㨆㨋r;쀀\uD835\uDCCBĀbp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀\uD835\uDD34pf;쀀\uD835\uDD68Ā;eᑹ㩦atèᑹcr;쀀\uD835\uDCCCૣណ㪇\x00㪋\x00㪐㪛\x00\x00㪝㪨㪫㪯\x00\x00㫃㫎\x00㫘ៜtré៑r;쀀\uD835\uDD35ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀\uD835\uDD69imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀\uD835\uDCCDĀpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀\uD835\uDD36cy;䑗pf;쀀\uD835\uDD6Acr;쀀\uD835\uDCCEĀcm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀\uD835\uDD37cy;䐶grarr;懝pf;쀀\uD835\uDD6Bcr;쀀\uD835\uDCCFĀjn㮅㮇;怍j;怌".split("").map((g)=>g.charCodeAt(0)));var $b,A$=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),P$=($b=String.fromCodePoint)!==null&&$b!==void 0?$b:function(g){let _="";if(g>65535)g-=65536,_+=String.fromCharCode(g>>>10&1023|55296),g=56320|g&1023;return _+=String.fromCharCode(g),_};function EI(g){var _;if(g>=55296&&g<=57343||g>1114111)return 65533;return(_=A$.get(g))!==null&&_!==void 0?_:g}var nr;(function(g){g[g.NUM=35]="NUM",g[g.SEMI=59]="SEMI",g[g.EQUALS=61]="EQUALS",g[g.ZERO=48]="ZERO",g[g.NINE=57]="NINE",g[g.LOWER_A=97]="LOWER_A",g[g.LOWER_F=102]="LOWER_F",g[g.LOWER_X=120]="LOWER_X",g[g.LOWER_Z=122]="LOWER_Z",g[g.UPPER_A=65]="UPPER_A",g[g.UPPER_F=70]="UPPER_F",g[g.UPPER_Z=90]="UPPER_Z"})(nr||(nr={}));var z$=32,ts;(function(g){g[g.VALUE_LENGTH=49152]="VALUE_LENGTH",g[g.BRANCH_LENGTH=16256]="BRANCH_LENGTH",g[g.JUMP_TABLE=127]="JUMP_TABLE"})(ts||(ts={}));function Ub(g){return g>=nr.ZERO&&g<=nr.NINE}function N$(g){return g>=nr.UPPER_A&&g<=nr.UPPER_F||g>=nr.LOWER_A&&g<=nr.LOWER_F}function O$(g){return g>=nr.UPPER_A&&g<=nr.UPPER_Z||g>=nr.LOWER_A&&g<=nr.LOWER_Z||Ub(g)}function M$(g){return g===nr.EQUALS||O$(g)}var tr;(function(g){g[g.EntityStart=0]="EntityStart",g[g.NumericStart=1]="NumericStart",g[g.NumericDecimal=2]="NumericDecimal",g[g.NumericHex=3]="NumericHex",g[g.NamedEntity=4]="NamedEntity"})(tr||(tr={}));var ni;(function(g){g[g.Legacy=0]="Legacy",g[g.Strict=1]="Strict",g[g.Attribute=2]="Attribute"})(ni||(ni={}));class Fb{constructor(g,_,E){this.decodeTree=g,this.emitCodePoint=_,this.errors=E,this.state=tr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ni.Strict}startEntity(g){this.decodeMode=g,this.state=tr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(g,_){switch(this.state){case tr.EntityStart:{if(g.charCodeAt(_)===nr.NUM)return this.state=tr.NumericStart,this.consumed+=1,this.stateNumericStart(g,_+1);return this.state=tr.NamedEntity,this.stateNamedEntity(g,_)}case tr.NumericStart:return this.stateNumericStart(g,_);case tr.NumericDecimal:return this.stateNumericDecimal(g,_);case tr.NumericHex:return this.stateNumericHex(g,_);case tr.NamedEntity:return this.stateNamedEntity(g,_)}}stateNumericStart(g,_){if(_>=g.length)return-1;if((g.charCodeAt(_)|z$)===nr.LOWER_X)return this.state=tr.NumericHex,this.consumed+=1,this.stateNumericHex(g,_+1);return this.state=tr.NumericDecimal,this.stateNumericDecimal(g,_)}addToNumericResult(g,_,E,T){if(_!==E){let R=E-_;this.result=this.result*Math.pow(T,R)+Number.parseInt(g.substr(_,R),T),this.consumed+=R}}stateNumericHex(g,_){let E=_;while(_<g.length){let T=g.charCodeAt(_);if(Ub(T)||N$(T))_+=1;else return this.addToNumericResult(g,E,_,16),this.emitNumericEntity(T,3)}return this.addToNumericResult(g,E,_,16),-1}stateNumericDecimal(g,_){let E=_;while(_<g.length){let T=g.charCodeAt(_);if(Ub(T))_+=1;else return this.addToNumericResult(g,E,_,10),this.emitNumericEntity(T,2)}return this.addToNumericResult(g,E,_,10),-1}emitNumericEntity(g,_){var E;if(this.consumed<=_)return(E=this.errors)===null||E===void 0||E.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(g===nr.SEMI)this.consumed+=1;else if(this.decodeMode===ni.Strict)return 0;if(this.emitCodePoint(EI(this.result),this.consumed),this.errors){if(g!==nr.SEMI)this.errors.missingSemicolonAfterCharacterReference();this.errors.validateNumericCharacterReference(this.result)}return this.consumed}stateNamedEntity(g,_){let{decodeTree:E}=this,T=E[this.treeIndex],R=(T&ts.VALUE_LENGTH)>>14;for(;_<g.length;_++,this.excess++){let w=g.charCodeAt(_);if(this.treeIndex=L$(E,T,this.treeIndex+Math.max(1,R),w),this.treeIndex<0)return this.result===0||this.decodeMode===ni.Attribute&&(R===0||M$(w))?0:this.emitNotTerminatedNamedEntity();if(T=E[this.treeIndex],R=(T&ts.VALUE_LENGTH)>>14,R!==0){if(w===nr.SEMI)return this.emitNamedEntityData(this.treeIndex,R,this.consumed+this.excess);if(this.decodeMode!==ni.Strict)this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0}}return-1}emitNotTerminatedNamedEntity(){var g;let{result:_,decodeTree:E}=this,T=(E[_]&ts.VALUE_LENGTH)>>14;return this.emitNamedEntityData(_,T,this.consumed),(g=this.errors)===null||g===void 0||g.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(g,_,E){let{decodeTree:T}=this;if(this.emitCodePoint(_===1?T[g]&~ts.VALUE_LENGTH:T[g+1],E),_===3)this.emitCodePoint(T[g+2],E);return E}end(){var g;switch(this.state){case tr.NamedEntity:return this.result!==0&&(this.decodeMode!==ni.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case tr.NumericDecimal:return this.emitNumericEntity(0,2);case tr.NumericHex:return this.emitNumericEntity(0,3);case tr.NumericStart:return(g=this.errors)===null||g===void 0||g.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case tr.EntityStart:return 0}}}function L$(g,_,E,T){let R=(_&ts.BRANCH_LENGTH)>>7,w=_&ts.JUMP_TABLE;if(R===0)return w!==0&&T===w?E:-1;if(w){let K=T-w;return K<0||K>=R?-1:g[E+K]-1}let B=E,Z=B+R-1;while(B<=Z){let K=B+Z>>>1,X=g[K];if(X<T)B=K+1;else if(X>T)Z=K-1;else return g[K+R]}return-1}var Qe;(function(g){g.HTML="http://www.w3.org/1999/xhtml",g.MATHML="http://www.w3.org/1998/Math/MathML",g.SVG="http://www.w3.org/2000/svg",g.XLINK="http://www.w3.org/1999/xlink",g.XML="http://www.w3.org/XML/1998/namespace",g.XMLNS="http://www.w3.org/2000/xmlns/"})(Qe||(Qe={}));var yi;(function(g){g.TYPE="type",g.ACTION="action",g.ENCODING="encoding",g.PROMPT="prompt",g.NAME="name",g.COLOR="color",g.FACE="face",g.SIZE="size"})(yi||(yi={}));var Ar;(function(g){g.NO_QUIRKS="no-quirks",g.QUIRKS="quirks",g.LIMITED_QUIRKS="limited-quirks"})(Ar||(Ar={}));var ze;(function(g){g.A="a",g.ADDRESS="address",g.ANNOTATION_XML="annotation-xml",g.APPLET="applet",g.AREA="area",g.ARTICLE="article",g.ASIDE="aside",g.B="b",g.BASE="base",g.BASEFONT="basefont",g.BGSOUND="bgsound",g.BIG="big",g.BLOCKQUOTE="blockquote",g.BODY="body",g.BR="br",g.BUTTON="button",g.CAPTION="caption",g.CENTER="center",g.CODE="code",g.COL="col",g.COLGROUP="colgroup",g.DD="dd",g.DESC="desc",g.DETAILS="details",g.DIALOG="dialog",g.DIR="dir",g.DIV="div",g.DL="dl",g.DT="dt",g.EM="em",g.EMBED="embed",g.FIELDSET="fieldset",g.FIGCAPTION="figcaption",g.FIGURE="figure",g.FONT="font",g.FOOTER="footer",g.FOREIGN_OBJECT="foreignObject",g.FORM="form",g.FRAME="frame",g.FRAMESET="frameset",g.H1="h1",g.H2="h2",g.H3="h3",g.H4="h4",g.H5="h5",g.H6="h6",g.HEAD="head",g.HEADER="header",g.HGROUP="hgroup",g.HR="hr",g.HTML="html",g.I="i",g.IMG="img",g.IMAGE="image",g.INPUT="input",g.IFRAME="iframe",g.KEYGEN="keygen",g.LABEL="label",g.LI="li",g.LINK="link",g.LISTING="listing",g.MAIN="main",g.MALIGNMARK="malignmark",g.MARQUEE="marquee",g.MATH="math",g.MENU="menu",g.META="meta",g.MGLYPH="mglyph",g.MI="mi",g.MO="mo",g.MN="mn",g.MS="ms",g.MTEXT="mtext",g.NAV="nav",g.NOBR="nobr",g.NOFRAMES="noframes",g.NOEMBED="noembed",g.NOSCRIPT="noscript",g.OBJECT="object",g.OL="ol",g.OPTGROUP="optgroup",g.OPTION="option",g.P="p",g.PARAM="param",g.PLAINTEXT="plaintext",g.PRE="pre",g.RB="rb",g.RP="rp",g.RT="rt",g.RTC="rtc",g.RUBY="ruby",g.S="s",g.SCRIPT="script",g.SEARCH="search",g.SECTION="section",g.SELECT="select",g.SOURCE="source",g.SMALL="small",g.SPAN="span",g.STRIKE="strike",g.STRONG="strong",g.STYLE="style",g.SUB="sub",g.SUMMARY="summary",g.SUP="sup",g.TABLE="table",g.TBODY="tbody",g.TEMPLATE="template",g.TEXTAREA="textarea",g.TFOOT="tfoot",g.TD="td",g.TH="th",g.THEAD="thead",g.TITLE="title",g.TR="tr",g.TRACK="track",g.TT="tt",g.U="u",g.UL="ul",g.SVG="svg",g.VAR="var",g.WBR="wbr",g.XMP="xmp"})(ze||(ze={}));var J;(function(g){g[g.UNKNOWN=0]="UNKNOWN",g[g.A=1]="A",g[g.ADDRESS=2]="ADDRESS",g[g.ANNOTATION_XML=3]="ANNOTATION_XML",g[g.APPLET=4]="APPLET",g[g.AREA=5]="AREA",g[g.ARTICLE=6]="ARTICLE",g[g.ASIDE=7]="ASIDE",g[g.B=8]="B",g[g.BASE=9]="BASE",g[g.BASEFONT=10]="BASEFONT",g[g.BGSOUND=11]="BGSOUND",g[g.BIG=12]="BIG",g[g.BLOCKQUOTE=13]="BLOCKQUOTE",g[g.BODY=14]="BODY",g[g.BR=15]="BR",g[g.BUTTON=16]="BUTTON",g[g.CAPTION=17]="CAPTION",g[g.CENTER=18]="CENTER",g[g.CODE=19]="CODE",g[g.COL=20]="COL",g[g.COLGROUP=21]="COLGROUP",g[g.DD=22]="DD",g[g.DESC=23]="DESC",g[g.DETAILS=24]="DETAILS",g[g.DIALOG=25]="DIALOG",g[g.DIR=26]="DIR",g[g.DIV=27]="DIV",g[g.DL=28]="DL",g[g.DT=29]="DT",g[g.EM=30]="EM",g[g.EMBED=31]="EMBED",g[g.FIELDSET=32]="FIELDSET",g[g.FIGCAPTION=33]="FIGCAPTION",g[g.FIGURE=34]="FIGURE",g[g.FONT=35]="FONT",g[g.FOOTER=36]="FOOTER",g[g.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",g[g.FORM=38]="FORM",g[g.FRAME=39]="FRAME",g[g.FRAMESET=40]="FRAMESET",g[g.H1=41]="H1",g[g.H2=42]="H2",g[g.H3=43]="H3",g[g.H4=44]="H4",g[g.H5=45]="H5",g[g.H6=46]="H6",g[g.HEAD=47]="HEAD",g[g.HEADER=48]="HEADER",g[g.HGROUP=49]="HGROUP",g[g.HR=50]="HR",g[g.HTML=51]="HTML",g[g.I=52]="I",g[g.IMG=53]="IMG",g[g.IMAGE=54]="IMAGE",g[g.INPUT=55]="INPUT",g[g.IFRAME=56]="IFRAME",g[g.KEYGEN=57]="KEYGEN",g[g.LABEL=58]="LABEL",g[g.LI=59]="LI",g[g.LINK=60]="LINK",g[g.LISTING=61]="LISTING",g[g.MAIN=62]="MAIN",g[g.MALIGNMARK=63]="MALIGNMARK",g[g.MARQUEE=64]="MARQUEE",g[g.MATH=65]="MATH",g[g.MENU=66]="MENU",g[g.META=67]="META",g[g.MGLYPH=68]="MGLYPH",g[g.MI=69]="MI",g[g.MO=70]="MO",g[g.MN=71]="MN",g[g.MS=72]="MS",g[g.MTEXT=73]="MTEXT",g[g.NAV=74]="NAV",g[g.NOBR=75]="NOBR",g[g.NOFRAMES=76]="NOFRAMES",g[g.NOEMBED=77]="NOEMBED",g[g.NOSCRIPT=78]="NOSCRIPT",g[g.OBJECT=79]="OBJECT",g[g.OL=80]="OL",g[g.OPTGROUP=81]="OPTGROUP",g[g.OPTION=82]="OPTION",g[g.P=83]="P",g[g.PARAM=84]="PARAM",g[g.PLAINTEXT=85]="PLAINTEXT",g[g.PRE=86]="PRE",g[g.RB=87]="RB",g[g.RP=88]="RP",g[g.RT=89]="RT",g[g.RTC=90]="RTC",g[g.RUBY=91]="RUBY",g[g.S=92]="S",g[g.SCRIPT=93]="SCRIPT",g[g.SEARCH=94]="SEARCH",g[g.SECTION=95]="SECTION",g[g.SELECT=96]="SELECT",g[g.SOURCE=97]="SOURCE",g[g.SMALL=98]="SMALL",g[g.SPAN=99]="SPAN",g[g.STRIKE=100]="STRIKE",g[g.STRONG=101]="STRONG",g[g.STYLE=102]="STYLE",g[g.SUB=103]="SUB",g[g.SUMMARY=104]="SUMMARY",g[g.SUP=105]="SUP",g[g.TABLE=106]="TABLE",g[g.TBODY=107]="TBODY",g[g.TEMPLATE=108]="TEMPLATE",g[g.TEXTAREA=109]="TEXTAREA",g[g.TFOOT=110]="TFOOT",g[g.TD=111]="TD",g[g.TH=112]="TH",g[g.THEAD=113]="THEAD",g[g.TITLE=114]="TITLE",g[g.TR=115]="TR",g[g.TRACK=116]="TRACK",g[g.TT=117]="TT",g[g.U=118]="U",g[g.UL=119]="UL",g[g.SVG=120]="SVG",g[g.VAR=121]="VAR",g[g.WBR=122]="WBR",g[g.XMP=123]="XMP"})(J||(J={}));var D$=new Map([[ze.A,J.A],[ze.ADDRESS,J.ADDRESS],[ze.ANNOTATION_XML,J.ANNOTATION_XML],[ze.APPLET,J.APPLET],[ze.AREA,J.AREA],[ze.ARTICLE,J.ARTICLE],[ze.ASIDE,J.ASIDE],[ze.B,J.B],[ze.BASE,J.BASE],[ze.BASEFONT,J.BASEFONT],[ze.BGSOUND,J.BGSOUND],[ze.BIG,J.BIG],[ze.BLOCKQUOTE,J.BLOCKQUOTE],[ze.BODY,J.BODY],[ze.BR,J.BR],[ze.BUTTON,J.BUTTON],[ze.CAPTION,J.CAPTION],[ze.CENTER,J.CENTER],[ze.CODE,J.CODE],[ze.COL,J.COL],[ze.COLGROUP,J.COLGROUP],[ze.DD,J.DD],[ze.DESC,J.DESC],[ze.DETAILS,J.DETAILS],[ze.DIALOG,J.DIALOG],[ze.DIR,J.DIR],[ze.DIV,J.DIV],[ze.DL,J.DL],[ze.DT,J.DT],[ze.EM,J.EM],[ze.EMBED,J.EMBED],[ze.FIELDSET,J.FIELDSET],[ze.FIGCAPTION,J.FIGCAPTION],[ze.FIGURE,J.FIGURE],[ze.FONT,J.FONT],[ze.FOOTER,J.FOOTER],[ze.FOREIGN_OBJECT,J.FOREIGN_OBJECT],[ze.FORM,J.FORM],[ze.FRAME,J.FRAME],[ze.FRAMESET,J.FRAMESET],[ze.H1,J.H1],[ze.H2,J.H2],[ze.H3,J.H3],[ze.H4,J.H4],[ze.H5,J.H5],[ze.H6,J.H6],[ze.HEAD,J.HEAD],[ze.HEADER,J.HEADER],[ze.HGROUP,J.HGROUP],[ze.HR,J.HR],[ze.HTML,J.HTML],[ze.I,J.I],[ze.IMG,J.IMG],[ze.IMAGE,J.IMAGE],[ze.INPUT,J.INPUT],[ze.IFRAME,J.IFRAME],[ze.KEYGEN,J.KEYGEN],[ze.LABEL,J.LABEL],[ze.LI,J.LI],[ze.LINK,J.LINK],[ze.LISTING,J.LISTING],[ze.MAIN,J.MAIN],[ze.MALIGNMARK,J.MALIGNMARK],[ze.MARQUEE,J.MARQUEE],[ze.MATH,J.MATH],[ze.MENU,J.MENU],[ze.META,J.META],[ze.MGLYPH,J.MGLYPH],[ze.MI,J.MI],[ze.MO,J.MO],[ze.MN,J.MN],[ze.MS,J.MS],[ze.MTEXT,J.MTEXT],[ze.NAV,J.NAV],[ze.NOBR,J.NOBR],[ze.NOFRAMES,J.NOFRAMES],[ze.NOEMBED,J.NOEMBED],[ze.NOSCRIPT,J.NOSCRIPT],[ze.OBJECT,J.OBJECT],[ze.OL,J.OL],[ze.OPTGROUP,J.OPTGROUP],[ze.OPTION,J.OPTION],[ze.P,J.P],[ze.PARAM,J.PARAM],[ze.PLAINTEXT,J.PLAINTEXT],[ze.PRE,J.PRE],[ze.RB,J.RB],[ze.RP,J.RP],[ze.RT,J.RT],[ze.RTC,J.RTC],[ze.RUBY,J.RUBY],[ze.S,J.S],[ze.SCRIPT,J.SCRIPT],[ze.SEARCH,J.SEARCH],[ze.SECTION,J.SECTION],[ze.SELECT,J.SELECT],[ze.SOURCE,J.SOURCE],[ze.SMALL,J.SMALL],[ze.SPAN,J.SPAN],[ze.STRIKE,J.STRIKE],[ze.STRONG,J.STRONG],[ze.STYLE,J.STYLE],[ze.SUB,J.SUB],[ze.SUMMARY,J.SUMMARY],[ze.SUP,J.SUP],[ze.TABLE,J.TABLE],[ze.TBODY,J.TBODY],[ze.TEMPLATE,J.TEMPLATE],[ze.TEXTAREA,J.TEXTAREA],[ze.TFOOT,J.TFOOT],[ze.TD,J.TD],[ze.TH,J.TH],[ze.THEAD,J.THEAD],[ze.TITLE,J.TITLE],[ze.TR,J.TR],[ze.TRACK,J.TRACK],[ze.TT,J.TT],[ze.U,J.U],[ze.UL,J.UL],[ze.SVG,J.SVG],[ze.VAR,J.VAR],[ze.WBR,J.WBR],[ze.XMP,J.XMP]]);function vi(g){var _;return(_=D$.get(g))!==null&&_!==void 0?_:J.UNKNOWN}var tt=J,TI={[Qe.HTML]:new Set([tt.ADDRESS,tt.APPLET,tt.AREA,tt.ARTICLE,tt.ASIDE,tt.BASE,tt.BASEFONT,tt.BGSOUND,tt.BLOCKQUOTE,tt.BODY,tt.BR,tt.BUTTON,tt.CAPTION,tt.CENTER,tt.COL,tt.COLGROUP,tt.DD,tt.DETAILS,tt.DIR,tt.DIV,tt.DL,tt.DT,tt.EMBED,tt.FIELDSET,tt.FIGCAPTION,tt.FIGURE,tt.FOOTER,tt.FORM,tt.FRAME,tt.FRAMESET,tt.H1,tt.H2,tt.H3,tt.H4,tt.H5,tt.H6,tt.HEAD,tt.HEADER,tt.HGROUP,tt.HR,tt.HTML,tt.IFRAME,tt.IMG,tt.INPUT,tt.LI,tt.LINK,tt.LISTING,tt.MAIN,tt.MARQUEE,tt.MENU,tt.META,tt.NAV,tt.NOEMBED,tt.NOFRAMES,tt.NOSCRIPT,tt.OBJECT,tt.OL,tt.P,tt.PARAM,tt.PLAINTEXT,tt.PRE,tt.SCRIPT,tt.SECTION,tt.SELECT,tt.SOURCE,tt.STYLE,tt.SUMMARY,tt.TABLE,tt.TBODY,tt.TD,tt.TEMPLATE,tt.TEXTAREA,tt.TFOOT,tt.TH,tt.THEAD,tt.TITLE,tt.TR,tt.TRACK,tt.UL,tt.WBR,tt.XMP]),[Qe.MATHML]:new Set([tt.MI,tt.MO,tt.MN,tt.MS,tt.MTEXT,tt.ANNOTATION_XML]),[Qe.SVG]:new Set([tt.TITLE,tt.FOREIGN_OBJECT,tt.DESC]),[Qe.XLINK]:new Set,[Qe.XML]:new Set,[Qe.XMLNS]:new Set},xd=new Set([tt.H1,tt.H2,tt.H3,tt.H4,tt.H5,tt.H6]),goe=new Set([ze.STYLE,ze.SCRIPT,ze.XMP,ze.IFRAME,ze.NOEMBED,ze.NOFRAMES,ze.PLAINTEXT]);var _e;(function(g){g[g.DATA=0]="DATA",g[g.RCDATA=1]="RCDATA",g[g.RAWTEXT=2]="RAWTEXT",g[g.SCRIPT_DATA=3]="SCRIPT_DATA",g[g.PLAINTEXT=4]="PLAINTEXT",g[g.TAG_OPEN=5]="TAG_OPEN",g[g.END_TAG_OPEN=6]="END_TAG_OPEN",g[g.TAG_NAME=7]="TAG_NAME",g[g.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",g[g.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",g[g.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",g[g.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",g[g.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",g[g.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",g[g.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",g[g.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",g[g.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",g[g.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",g[g.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",g[g.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",g[g.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",g[g.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",g[g.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",g[g.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",g[g.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",g[g.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",g[g.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",g[g.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",g[g.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",g[g.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",g[g.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",g[g.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",g[g.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",g[g.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",g[g.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",g[g.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",g[g.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",g[g.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",g[g.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",g[g.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",g[g.BOGUS_COMMENT=40]="BOGUS_COMMENT",g[g.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",g[g.COMMENT_START=42]="COMMENT_START",g[g.COMMENT_START_DASH=43]="COMMENT_START_DASH",g[g.COMMENT=44]="COMMENT",g[g.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",g[g.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",g[g.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",g[g.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",g[g.COMMENT_END_DASH=49]="COMMENT_END_DASH",g[g.COMMENT_END=50]="COMMENT_END",g[g.COMMENT_END_BANG=51]="COMMENT_END_BANG",g[g.DOCTYPE=52]="DOCTYPE",g[g.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",g[g.DOCTYPE_NAME=54]="DOCTYPE_NAME",g[g.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",g[g.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",g[g.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",g[g.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",g[g.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",g[g.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",g[g.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",g[g.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",g[g.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",g[g.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",g[g.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",g[g.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",g[g.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",g[g.CDATA_SECTION=68]="CDATA_SECTION",g[g.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",g[g.CDATA_SECTION_END=70]="CDATA_SECTION_END",g[g.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",g[g.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(_e||(_e={}));var zn={DATA:_e.DATA,RCDATA:_e.RCDATA,RAWTEXT:_e.RAWTEXT,SCRIPT_DATA:_e.SCRIPT_DATA,PLAINTEXT:_e.PLAINTEXT,CDATA_SECTION:_e.CDATA_SECTION};function $$(g){return g>=ge.DIGIT_0&&g<=ge.DIGIT_9}function Rd(g){return g>=ge.LATIN_CAPITAL_A&&g<=ge.LATIN_CAPITAL_Z}function U$(g){return g>=ge.LATIN_SMALL_A&&g<=ge.LATIN_SMALL_Z}function ns(g){return U$(g)||Rd(g)}function vI(g){return ns(g)||$$(g)}function If(g){return g+32}function RI(g){return g===ge.SPACE||g===ge.LINE_FEED||g===ge.TABULATION||g===ge.FORM_FEED}function xI(g){return RI(g)||g===ge.SOLIDUS||g===ge.GREATER_THAN_SIGN}function F$(g){if(g===ge.NULL)return Le.nullCharacterReference;else if(g>1114111)return Le.characterReferenceOutsideUnicodeRange;else if(vf(g))return Le.surrogateCharacterReference;else if(Rf(g))return Le.noncharacterCharacterReference;else if(xf(g)||g===ge.CARRIAGE_RETURN)return Le.controlCharacterReference;return null}class Cf{constructor(g,_){this.options=g,this.handler=_,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=_e.DATA,this.returnState=_e.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Lb(_),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Fb(Db,(E,T)=>{this.preprocessor.pos=this.entityStartPos+T-1,this._flushCodePointConsumedAsCharacterReference(E)},_.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Le.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:(E)=>{this._err(Le.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+E)},validateNumericCharacterReference:(E)=>{let T=F$(E);if(T)this._err(T,1)}}:void 0)}_err(g,_=0){var E,T;(T=(E=this.handler).onParseError)===null||T===void 0||T.call(E,this.preprocessor.getError(g,_))}getCurrentLocation(g){if(!this.options.sourceCodeLocationInfo)return null;return{startLine:this.preprocessor.line,startCol:this.preprocessor.col-g,startOffset:this.preprocessor.offset-g,endLine:-1,endCol:-1,endOffset:-1}}_runParsingLoop(){if(this.inLoop)return;this.inLoop=!0;while(this.active&&!this.paused){this.consumedAfterSnapshot=0;let g=this._consume();if(!this._ensureHibernation())this._callState(g)}this.inLoop=!1}pause(){this.paused=!0}resume(g){if(!this.paused)throw Error("Parser was already resumed");if(this.paused=!1,this.inLoop)return;if(this._runParsingLoop(),!this.paused)g===null||g===void 0||g()}write(g,_,E){if(this.active=!0,this.preprocessor.write(g,_),this._runParsingLoop(),!this.paused)E===null||E===void 0||E()}insertHtmlAtCurrentPos(g){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(g),this._runParsingLoop()}_ensureHibernation(){if(this.preprocessor.endOfChunkHit)return this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0;return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(g){this.consumedAfterSnapshot+=g;for(let _=0;_<g;_++)this.preprocessor.advance()}_consumeSequenceIfMatch(g,_){if(this.preprocessor.startsWith(g,_))return this._advanceBy(g.length-1),!0;return!1}_createStartTagToken(){this.currentToken={type:an.START_TAG,tagName:"",tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:an.END_TAG,tagName:"",tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(g){this.currentToken={type:an.COMMENT,data:"",location:this.getCurrentLocation(g)}}_createDoctypeToken(g){this.currentToken={type:an.DOCTYPE,name:g,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(g,_){this.currentCharacterToken={type:g,chars:_,location:this.currentLocation}}_createAttr(g){this.currentAttr={name:g,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var g,_;let E=this.currentToken;if(kf(E,this.currentAttr.name)===null){if(E.attrs.push(this.currentAttr),E.location&&this.currentLocation){let T=(g=(_=E.location).attrs)!==null&&g!==void 0?g:_.attrs=Object.create(null);T[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(Le.duplicateAttribute)}_leaveAttrValue(){if(this.currentLocation)this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset}prepareToken(g){if(this._emitCurrentCharacterToken(g.location),this.currentToken=null,g.location)g.location.endLine=this.preprocessor.line,g.location.endCol=this.preprocessor.col+1,g.location.endOffset=this.preprocessor.offset+1;this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let g=this.currentToken;if(this.prepareToken(g),g.tagID=vi(g.tagName),g.type===an.START_TAG)this.lastStartTagName=g.tagName,this.handler.onStartTag(g);else{if(g.attrs.length>0)this._err(Le.endTagWithAttributes);if(g.selfClosing)this._err(Le.endTagWithTrailingSolidus);this.handler.onEndTag(g)}this.preprocessor.dropParsedChunk()}emitCurrentComment(g){this.prepareToken(g),this.handler.onComment(g),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(g){this.prepareToken(g),this.handler.onDoctype(g),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(g){if(this.currentCharacterToken){if(g&&this.currentCharacterToken.location)this.currentCharacterToken.location.endLine=g.startLine,this.currentCharacterToken.location.endCol=g.startCol,this.currentCharacterToken.location.endOffset=g.startOffset;switch(this.currentCharacterToken.type){case an.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case an.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case an.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let g=this.getCurrentLocation(0);if(g)g.endLine=g.startLine,g.endCol=g.startCol,g.endOffset=g.startOffset;this._emitCurrentCharacterToken(g),this.handler.onEof({type:an.EOF,location:g}),this.active=!1}_appendCharToCurrentCharacterToken(g,_){if(this.currentCharacterToken)if(this.currentCharacterToken.type===g){this.currentCharacterToken.chars+=_;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(g,_)}_emitCodePoint(g){let _=RI(g)?an.WHITESPACE_CHARACTER:g===ge.NULL?an.NULL_CHARACTER:an.CHARACTER;this._appendCharToCurrentCharacterToken(_,String.fromCodePoint(g))}_emitChars(g){this._appendCharToCurrentCharacterToken(an.CHARACTER,g)}_startCharacterReference(){this.returnState=this.state,this.state=_e.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ni.Attribute:ni.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===_e.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===_e.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===_e.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(g){if(this._isCharacterReferenceInAttribute())this.currentAttr.value+=String.fromCodePoint(g);else this._emitCodePoint(g)}_callState(g){switch(this.state){case _e.DATA:{this._stateData(g);break}case _e.RCDATA:{this._stateRcdata(g);break}case _e.RAWTEXT:{this._stateRawtext(g);break}case _e.SCRIPT_DATA:{this._stateScriptData(g);break}case _e.PLAINTEXT:{this._statePlaintext(g);break}case _e.TAG_OPEN:{this._stateTagOpen(g);break}case _e.END_TAG_OPEN:{this._stateEndTagOpen(g);break}case _e.TAG_NAME:{this._stateTagName(g);break}case _e.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(g);break}case _e.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(g);break}case _e.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(g);break}case _e.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(g);break}case _e.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(g);break}case _e.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(g);break}case _e.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(g);break}case _e.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(g);break}case _e.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(g);break}case _e.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(g);break}case _e.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(g);break}case _e.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(g);break}case _e.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(g);break}case _e.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(g);break}case _e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(g);break}case _e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(g);break}case _e.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(g);break}case _e.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(g);break}case _e.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(g);break}case _e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(g);break}case _e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(g);break}case _e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(g);break}case _e.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(g);break}case _e.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(g);break}case _e.ATTRIBUTE_NAME:{this._stateAttributeName(g);break}case _e.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(g);break}case _e.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(g);break}case _e.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(g);break}case _e.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(g);break}case _e.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(g);break}case _e.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(g);break}case _e.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(g);break}case _e.BOGUS_COMMENT:{this._stateBogusComment(g);break}case _e.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(g);break}case _e.COMMENT_START:{this._stateCommentStart(g);break}case _e.COMMENT_START_DASH:{this._stateCommentStartDash(g);break}case _e.COMMENT:{this._stateComment(g);break}case _e.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(g);break}case _e.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(g);break}case _e.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(g);break}case _e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(g);break}case _e.COMMENT_END_DASH:{this._stateCommentEndDash(g);break}case _e.COMMENT_END:{this._stateCommentEnd(g);break}case _e.COMMENT_END_BANG:{this._stateCommentEndBang(g);break}case _e.DOCTYPE:{this._stateDoctype(g);break}case _e.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(g);break}case _e.DOCTYPE_NAME:{this._stateDoctypeName(g);break}case _e.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(g);break}case _e.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(g);break}case _e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(g);break}case _e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(g);break}case _e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(g);break}case _e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(g);break}case _e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(g);break}case _e.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(g);break}case _e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(g);break}case _e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(g);break}case _e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(g);break}case _e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(g);break}case _e.BOGUS_DOCTYPE:{this._stateBogusDoctype(g);break}case _e.CDATA_SECTION:{this._stateCdataSection(g);break}case _e.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(g);break}case _e.CDATA_SECTION_END:{this._stateCdataSectionEnd(g);break}case _e.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case _e.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(g);break}default:throw Error("Unknown state")}}_stateData(g){switch(g){case ge.LESS_THAN_SIGN:{this.state=_e.TAG_OPEN;break}case ge.AMPERSAND:{this._startCharacterReference();break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),this._emitCodePoint(g);break}case ge.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(g)}}_stateRcdata(g){switch(g){case ge.AMPERSAND:{this._startCharacterReference();break}case ge.LESS_THAN_SIGN:{this.state=_e.RCDATA_LESS_THAN_SIGN;break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),this._emitChars(In);break}case ge.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(g)}}_stateRawtext(g){switch(g){case ge.LESS_THAN_SIGN:{this.state=_e.RAWTEXT_LESS_THAN_SIGN;break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),this._emitChars(In);break}case ge.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(g)}}_stateScriptData(g){switch(g){case ge.LESS_THAN_SIGN:{this.state=_e.SCRIPT_DATA_LESS_THAN_SIGN;break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),this._emitChars(In);break}case ge.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(g)}}_statePlaintext(g){switch(g){case ge.NULL:{this._err(Le.unexpectedNullCharacter),this._emitChars(In);break}case ge.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(g)}}_stateTagOpen(g){if(ns(g))this._createStartTagToken(),this.state=_e.TAG_NAME,this._stateTagName(g);else switch(g){case ge.EXCLAMATION_MARK:{this.state=_e.MARKUP_DECLARATION_OPEN;break}case ge.SOLIDUS:{this.state=_e.END_TAG_OPEN;break}case ge.QUESTION_MARK:{this._err(Le.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=_e.BOGUS_COMMENT,this._stateBogusComment(g);break}case ge.EOF:{this._err(Le.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Le.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=_e.DATA,this._stateData(g)}}_stateEndTagOpen(g){if(ns(g))this._createEndTagToken(),this.state=_e.TAG_NAME,this._stateTagName(g);else switch(g){case ge.GREATER_THAN_SIGN:{this._err(Le.missingEndTagName),this.state=_e.DATA;break}case ge.EOF:{this._err(Le.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Le.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=_e.BOGUS_COMMENT,this._stateBogusComment(g)}}_stateTagName(g){let _=this.currentToken;switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this.state=_e.BEFORE_ATTRIBUTE_NAME;break}case ge.SOLIDUS:{this.state=_e.SELF_CLOSING_START_TAG;break}case ge.GREATER_THAN_SIGN:{this.state=_e.DATA,this.emitCurrentTagToken();break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),_.tagName+=In;break}case ge.EOF:{this._err(Le.eofInTag),this._emitEOFToken();break}default:_.tagName+=String.fromCodePoint(Rd(g)?If(g):g)}}_stateRcdataLessThanSign(g){if(g===ge.SOLIDUS)this.state=_e.RCDATA_END_TAG_OPEN;else this._emitChars("<"),this.state=_e.RCDATA,this._stateRcdata(g)}_stateRcdataEndTagOpen(g){if(ns(g))this.state=_e.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(g);else this._emitChars("</"),this.state=_e.RCDATA,this._stateRcdata(g)}handleSpecialEndTag(g){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let _=this.currentToken;switch(_.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=_e.BEFORE_ATTRIBUTE_NAME,!1;case ge.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=_e.SELF_CLOSING_START_TAG,!1;case ge.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=_e.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(g){if(this.handleSpecialEndTag(g))this._emitChars("</"),this.state=_e.RCDATA,this._stateRcdata(g)}_stateRawtextLessThanSign(g){if(g===ge.SOLIDUS)this.state=_e.RAWTEXT_END_TAG_OPEN;else this._emitChars("<"),this.state=_e.RAWTEXT,this._stateRawtext(g)}_stateRawtextEndTagOpen(g){if(ns(g))this.state=_e.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(g);else this._emitChars("</"),this.state=_e.RAWTEXT,this._stateRawtext(g)}_stateRawtextEndTagName(g){if(this.handleSpecialEndTag(g))this._emitChars("</"),this.state=_e.RAWTEXT,this._stateRawtext(g)}_stateScriptDataLessThanSign(g){switch(g){case ge.SOLIDUS:{this.state=_e.SCRIPT_DATA_END_TAG_OPEN;break}case ge.EXCLAMATION_MARK:{this.state=_e.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=_e.SCRIPT_DATA,this._stateScriptData(g)}}_stateScriptDataEndTagOpen(g){if(ns(g))this.state=_e.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(g);else this._emitChars("</"),this.state=_e.SCRIPT_DATA,this._stateScriptData(g)}_stateScriptDataEndTagName(g){if(this.handleSpecialEndTag(g))this._emitChars("</"),this.state=_e.SCRIPT_DATA,this._stateScriptData(g)}_stateScriptDataEscapeStart(g){if(g===ge.HYPHEN_MINUS)this.state=_e.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-");else this.state=_e.SCRIPT_DATA,this._stateScriptData(g)}_stateScriptDataEscapeStartDash(g){if(g===ge.HYPHEN_MINUS)this.state=_e.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");else this.state=_e.SCRIPT_DATA,this._stateScriptData(g)}_stateScriptDataEscaped(g){switch(g){case ge.HYPHEN_MINUS:{this.state=_e.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case ge.LESS_THAN_SIGN:{this.state=_e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),this._emitChars(In);break}case ge.EOF:{this._err(Le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(g)}}_stateScriptDataEscapedDash(g){switch(g){case ge.HYPHEN_MINUS:{this.state=_e.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case ge.LESS_THAN_SIGN:{this.state=_e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),this.state=_e.SCRIPT_DATA_ESCAPED,this._emitChars(In);break}case ge.EOF:{this._err(Le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=_e.SCRIPT_DATA_ESCAPED,this._emitCodePoint(g)}}_stateScriptDataEscapedDashDash(g){switch(g){case ge.HYPHEN_MINUS:{this._emitChars("-");break}case ge.LESS_THAN_SIGN:{this.state=_e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case ge.GREATER_THAN_SIGN:{this.state=_e.SCRIPT_DATA,this._emitChars(">");break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),this.state=_e.SCRIPT_DATA_ESCAPED,this._emitChars(In);break}case ge.EOF:{this._err(Le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=_e.SCRIPT_DATA_ESCAPED,this._emitCodePoint(g)}}_stateScriptDataEscapedLessThanSign(g){if(g===ge.SOLIDUS)this.state=_e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN;else if(ns(g))this._emitChars("<"),this.state=_e.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(g);else this._emitChars("<"),this.state=_e.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(g)}_stateScriptDataEscapedEndTagOpen(g){if(ns(g))this.state=_e.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(g);else this._emitChars("</"),this.state=_e.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(g)}_stateScriptDataEscapedEndTagName(g){if(this.handleSpecialEndTag(g))this._emitChars("</"),this.state=_e.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(g)}_stateScriptDataDoubleEscapeStart(g){if(this.preprocessor.startsWith(wr.SCRIPT,!1)&&xI(this.preprocessor.peek(wr.SCRIPT.length))){this._emitCodePoint(g);for(let _=0;_<wr.SCRIPT.length;_++)this._emitCodePoint(this._consume());this.state=_e.SCRIPT_DATA_DOUBLE_ESCAPED}else if(!this._ensureHibernation())this.state=_e.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(g)}_stateScriptDataDoubleEscaped(g){switch(g){case ge.HYPHEN_MINUS:{this.state=_e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case ge.LESS_THAN_SIGN:{this.state=_e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),this._emitChars(In);break}case ge.EOF:{this._err(Le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(g)}}_stateScriptDataDoubleEscapedDash(g){switch(g){case ge.HYPHEN_MINUS:{this.state=_e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case ge.LESS_THAN_SIGN:{this.state=_e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),this.state=_e.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(In);break}case ge.EOF:{this._err(Le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=_e.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(g)}}_stateScriptDataDoubleEscapedDashDash(g){switch(g){case ge.HYPHEN_MINUS:{this._emitChars("-");break}case ge.LESS_THAN_SIGN:{this.state=_e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case ge.GREATER_THAN_SIGN:{this.state=_e.SCRIPT_DATA,this._emitChars(">");break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),this.state=_e.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(In);break}case ge.EOF:{this._err(Le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=_e.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(g)}}_stateScriptDataDoubleEscapedLessThanSign(g){if(g===ge.SOLIDUS)this.state=_e.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/");else this.state=_e.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(g)}_stateScriptDataDoubleEscapeEnd(g){if(this.preprocessor.startsWith(wr.SCRIPT,!1)&&xI(this.preprocessor.peek(wr.SCRIPT.length))){this._emitCodePoint(g);for(let _=0;_<wr.SCRIPT.length;_++)this._emitCodePoint(this._consume());this.state=_e.SCRIPT_DATA_ESCAPED}else if(!this._ensureHibernation())this.state=_e.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(g)}_stateBeforeAttributeName(g){switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.SOLIDUS:case ge.GREATER_THAN_SIGN:case ge.EOF:{this.state=_e.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(g);break}case ge.EQUALS_SIGN:{this._err(Le.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=_e.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=_e.ATTRIBUTE_NAME,this._stateAttributeName(g)}}_stateAttributeName(g){switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:case ge.SOLIDUS:case ge.GREATER_THAN_SIGN:case ge.EOF:{this._leaveAttrName(),this.state=_e.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(g);break}case ge.EQUALS_SIGN:{this._leaveAttrName(),this.state=_e.BEFORE_ATTRIBUTE_VALUE;break}case ge.QUOTATION_MARK:case ge.APOSTROPHE:case ge.LESS_THAN_SIGN:{this._err(Le.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(g);break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),this.currentAttr.name+=In;break}default:this.currentAttr.name+=String.fromCodePoint(Rd(g)?If(g):g)}}_stateAfterAttributeName(g){switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.SOLIDUS:{this.state=_e.SELF_CLOSING_START_TAG;break}case ge.EQUALS_SIGN:{this.state=_e.BEFORE_ATTRIBUTE_VALUE;break}case ge.GREATER_THAN_SIGN:{this.state=_e.DATA,this.emitCurrentTagToken();break}case ge.EOF:{this._err(Le.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=_e.ATTRIBUTE_NAME,this._stateAttributeName(g)}}_stateBeforeAttributeValue(g){switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.QUOTATION_MARK:{this.state=_e.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case ge.APOSTROPHE:{this.state=_e.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case ge.GREATER_THAN_SIGN:{this._err(Le.missingAttributeValue),this.state=_e.DATA,this.emitCurrentTagToken();break}default:this.state=_e.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(g)}}_stateAttributeValueDoubleQuoted(g){switch(g){case ge.QUOTATION_MARK:{this.state=_e.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case ge.AMPERSAND:{this._startCharacterReference();break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),this.currentAttr.value+=In;break}case ge.EOF:{this._err(Le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(g)}}_stateAttributeValueSingleQuoted(g){switch(g){case ge.APOSTROPHE:{this.state=_e.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case ge.AMPERSAND:{this._startCharacterReference();break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),this.currentAttr.value+=In;break}case ge.EOF:{this._err(Le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(g)}}_stateAttributeValueUnquoted(g){switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this._leaveAttrValue(),this.state=_e.BEFORE_ATTRIBUTE_NAME;break}case ge.AMPERSAND:{this._startCharacterReference();break}case ge.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=_e.DATA,this.emitCurrentTagToken();break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),this.currentAttr.value+=In;break}case ge.QUOTATION_MARK:case ge.APOSTROPHE:case ge.LESS_THAN_SIGN:case ge.EQUALS_SIGN:case ge.GRAVE_ACCENT:{this._err(Le.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(g);break}case ge.EOF:{this._err(Le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(g)}}_stateAfterAttributeValueQuoted(g){switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this._leaveAttrValue(),this.state=_e.BEFORE_ATTRIBUTE_NAME;break}case ge.SOLIDUS:{this._leaveAttrValue(),this.state=_e.SELF_CLOSING_START_TAG;break}case ge.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=_e.DATA,this.emitCurrentTagToken();break}case ge.EOF:{this._err(Le.eofInTag),this._emitEOFToken();break}default:this._err(Le.missingWhitespaceBetweenAttributes),this.state=_e.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(g)}}_stateSelfClosingStartTag(g){switch(g){case ge.GREATER_THAN_SIGN:{let _=this.currentToken;_.selfClosing=!0,this.state=_e.DATA,this.emitCurrentTagToken();break}case ge.EOF:{this._err(Le.eofInTag),this._emitEOFToken();break}default:this._err(Le.unexpectedSolidusInTag),this.state=_e.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(g)}}_stateBogusComment(g){let _=this.currentToken;switch(g){case ge.GREATER_THAN_SIGN:{this.state=_e.DATA,this.emitCurrentComment(_);break}case ge.EOF:{this.emitCurrentComment(_),this._emitEOFToken();break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),_.data+=In;break}default:_.data+=String.fromCodePoint(g)}}_stateMarkupDeclarationOpen(g){if(this._consumeSequenceIfMatch(wr.DASH_DASH,!0))this._createCommentToken(wr.DASH_DASH.length+1),this.state=_e.COMMENT_START;else if(this._consumeSequenceIfMatch(wr.DOCTYPE,!1))this.currentLocation=this.getCurrentLocation(wr.DOCTYPE.length+1),this.state=_e.DOCTYPE;else if(this._consumeSequenceIfMatch(wr.CDATA_START,!0))if(this.inForeignNode)this.state=_e.CDATA_SECTION;else this._err(Le.cdataInHtmlContent),this._createCommentToken(wr.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=_e.BOGUS_COMMENT;else if(!this._ensureHibernation())this._err(Le.incorrectlyOpenedComment),this._createCommentToken(2),this.state=_e.BOGUS_COMMENT,this._stateBogusComment(g)}_stateCommentStart(g){switch(g){case ge.HYPHEN_MINUS:{this.state=_e.COMMENT_START_DASH;break}case ge.GREATER_THAN_SIGN:{this._err(Le.abruptClosingOfEmptyComment),this.state=_e.DATA;let _=this.currentToken;this.emitCurrentComment(_);break}default:this.state=_e.COMMENT,this._stateComment(g)}}_stateCommentStartDash(g){let _=this.currentToken;switch(g){case ge.HYPHEN_MINUS:{this.state=_e.COMMENT_END;break}case ge.GREATER_THAN_SIGN:{this._err(Le.abruptClosingOfEmptyComment),this.state=_e.DATA,this.emitCurrentComment(_);break}case ge.EOF:{this._err(Le.eofInComment),this.emitCurrentComment(_),this._emitEOFToken();break}default:_.data+="-",this.state=_e.COMMENT,this._stateComment(g)}}_stateComment(g){let _=this.currentToken;switch(g){case ge.HYPHEN_MINUS:{this.state=_e.COMMENT_END_DASH;break}case ge.LESS_THAN_SIGN:{_.data+="<",this.state=_e.COMMENT_LESS_THAN_SIGN;break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),_.data+=In;break}case ge.EOF:{this._err(Le.eofInComment),this.emitCurrentComment(_),this._emitEOFToken();break}default:_.data+=String.fromCodePoint(g)}}_stateCommentLessThanSign(g){let _=this.currentToken;switch(g){case ge.EXCLAMATION_MARK:{_.data+="!",this.state=_e.COMMENT_LESS_THAN_SIGN_BANG;break}case ge.LESS_THAN_SIGN:{_.data+="<";break}default:this.state=_e.COMMENT,this._stateComment(g)}}_stateCommentLessThanSignBang(g){if(g===ge.HYPHEN_MINUS)this.state=_e.COMMENT_LESS_THAN_SIGN_BANG_DASH;else this.state=_e.COMMENT,this._stateComment(g)}_stateCommentLessThanSignBangDash(g){if(g===ge.HYPHEN_MINUS)this.state=_e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH;else this.state=_e.COMMENT_END_DASH,this._stateCommentEndDash(g)}_stateCommentLessThanSignBangDashDash(g){if(g!==ge.GREATER_THAN_SIGN&&g!==ge.EOF)this._err(Le.nestedComment);this.state=_e.COMMENT_END,this._stateCommentEnd(g)}_stateCommentEndDash(g){let _=this.currentToken;switch(g){case ge.HYPHEN_MINUS:{this.state=_e.COMMENT_END;break}case ge.EOF:{this._err(Le.eofInComment),this.emitCurrentComment(_),this._emitEOFToken();break}default:_.data+="-",this.state=_e.COMMENT,this._stateComment(g)}}_stateCommentEnd(g){let _=this.currentToken;switch(g){case ge.GREATER_THAN_SIGN:{this.state=_e.DATA,this.emitCurrentComment(_);break}case ge.EXCLAMATION_MARK:{this.state=_e.COMMENT_END_BANG;break}case ge.HYPHEN_MINUS:{_.data+="-";break}case ge.EOF:{this._err(Le.eofInComment),this.emitCurrentComment(_),this._emitEOFToken();break}default:_.data+="--",this.state=_e.COMMENT,this._stateComment(g)}}_stateCommentEndBang(g){let _=this.currentToken;switch(g){case ge.HYPHEN_MINUS:{_.data+="--!",this.state=_e.COMMENT_END_DASH;break}case ge.GREATER_THAN_SIGN:{this._err(Le.incorrectlyClosedComment),this.state=_e.DATA,this.emitCurrentComment(_);break}case ge.EOF:{this._err(Le.eofInComment),this.emitCurrentComment(_),this._emitEOFToken();break}default:_.data+="--!",this.state=_e.COMMENT,this._stateComment(g)}}_stateDoctype(g){switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this.state=_e.BEFORE_DOCTYPE_NAME;break}case ge.GREATER_THAN_SIGN:{this.state=_e.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(g);break}case ge.EOF:{this._err(Le.eofInDoctype),this._createDoctypeToken(null);let _=this.currentToken;_.forceQuirks=!0,this.emitCurrentDoctype(_),this._emitEOFToken();break}default:this._err(Le.missingWhitespaceBeforeDoctypeName),this.state=_e.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(g)}}_stateBeforeDoctypeName(g){if(Rd(g))this._createDoctypeToken(String.fromCharCode(If(g))),this.state=_e.DOCTYPE_NAME;else switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.NULL:{this._err(Le.unexpectedNullCharacter),this._createDoctypeToken(In),this.state=_e.DOCTYPE_NAME;break}case ge.GREATER_THAN_SIGN:{this._err(Le.missingDoctypeName),this._createDoctypeToken(null);let _=this.currentToken;_.forceQuirks=!0,this.emitCurrentDoctype(_),this.state=_e.DATA;break}case ge.EOF:{this._err(Le.eofInDoctype),this._createDoctypeToken(null);let _=this.currentToken;_.forceQuirks=!0,this.emitCurrentDoctype(_),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(g)),this.state=_e.DOCTYPE_NAME}}_stateDoctypeName(g){let _=this.currentToken;switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this.state=_e.AFTER_DOCTYPE_NAME;break}case ge.GREATER_THAN_SIGN:{this.state=_e.DATA,this.emitCurrentDoctype(_);break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),_.name+=In;break}case ge.EOF:{this._err(Le.eofInDoctype),_.forceQuirks=!0,this.emitCurrentDoctype(_),this._emitEOFToken();break}default:_.name+=String.fromCodePoint(Rd(g)?If(g):g)}}_stateAfterDoctypeName(g){let _=this.currentToken;switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.GREATER_THAN_SIGN:{this.state=_e.DATA,this.emitCurrentDoctype(_);break}case ge.EOF:{this._err(Le.eofInDoctype),_.forceQuirks=!0,this.emitCurrentDoctype(_),this._emitEOFToken();break}default:if(this._consumeSequenceIfMatch(wr.PUBLIC,!1))this.state=_e.AFTER_DOCTYPE_PUBLIC_KEYWORD;else if(this._consumeSequenceIfMatch(wr.SYSTEM,!1))this.state=_e.AFTER_DOCTYPE_SYSTEM_KEYWORD;else if(!this._ensureHibernation())this._err(Le.invalidCharacterSequenceAfterDoctypeName),_.forceQuirks=!0,this.state=_e.BOGUS_DOCTYPE,this._stateBogusDoctype(g)}}_stateAfterDoctypePublicKeyword(g){let _=this.currentToken;switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this.state=_e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case ge.QUOTATION_MARK:{this._err(Le.missingWhitespaceAfterDoctypePublicKeyword),_.publicId="",this.state=_e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case ge.APOSTROPHE:{this._err(Le.missingWhitespaceAfterDoctypePublicKeyword),_.publicId="",this.state=_e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case ge.GREATER_THAN_SIGN:{this._err(Le.missingDoctypePublicIdentifier),_.forceQuirks=!0,this.state=_e.DATA,this.emitCurrentDoctype(_);break}case ge.EOF:{this._err(Le.eofInDoctype),_.forceQuirks=!0,this.emitCurrentDoctype(_),this._emitEOFToken();break}default:this._err(Le.missingQuoteBeforeDoctypePublicIdentifier),_.forceQuirks=!0,this.state=_e.BOGUS_DOCTYPE,this._stateBogusDoctype(g)}}_stateBeforeDoctypePublicIdentifier(g){let _=this.currentToken;switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.QUOTATION_MARK:{_.publicId="",this.state=_e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case ge.APOSTROPHE:{_.publicId="",this.state=_e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case ge.GREATER_THAN_SIGN:{this._err(Le.missingDoctypePublicIdentifier),_.forceQuirks=!0,this.state=_e.DATA,this.emitCurrentDoctype(_);break}case ge.EOF:{this._err(Le.eofInDoctype),_.forceQuirks=!0,this.emitCurrentDoctype(_),this._emitEOFToken();break}default:this._err(Le.missingQuoteBeforeDoctypePublicIdentifier),_.forceQuirks=!0,this.state=_e.BOGUS_DOCTYPE,this._stateBogusDoctype(g)}}_stateDoctypePublicIdentifierDoubleQuoted(g){let _=this.currentToken;switch(g){case ge.QUOTATION_MARK:{this.state=_e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),_.publicId+=In;break}case ge.GREATER_THAN_SIGN:{this._err(Le.abruptDoctypePublicIdentifier),_.forceQuirks=!0,this.emitCurrentDoctype(_),this.state=_e.DATA;break}case ge.EOF:{this._err(Le.eofInDoctype),_.forceQuirks=!0,this.emitCurrentDoctype(_),this._emitEOFToken();break}default:_.publicId+=String.fromCodePoint(g)}}_stateDoctypePublicIdentifierSingleQuoted(g){let _=this.currentToken;switch(g){case ge.APOSTROPHE:{this.state=_e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),_.publicId+=In;break}case ge.GREATER_THAN_SIGN:{this._err(Le.abruptDoctypePublicIdentifier),_.forceQuirks=!0,this.emitCurrentDoctype(_),this.state=_e.DATA;break}case ge.EOF:{this._err(Le.eofInDoctype),_.forceQuirks=!0,this.emitCurrentDoctype(_),this._emitEOFToken();break}default:_.publicId+=String.fromCodePoint(g)}}_stateAfterDoctypePublicIdentifier(g){let _=this.currentToken;switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this.state=_e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case ge.GREATER_THAN_SIGN:{this.state=_e.DATA,this.emitCurrentDoctype(_);break}case ge.QUOTATION_MARK:{this._err(Le.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),_.systemId="",this.state=_e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case ge.APOSTROPHE:{this._err(Le.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),_.systemId="",this.state=_e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case ge.EOF:{this._err(Le.eofInDoctype),_.forceQuirks=!0,this.emitCurrentDoctype(_),this._emitEOFToken();break}default:this._err(Le.missingQuoteBeforeDoctypeSystemIdentifier),_.forceQuirks=!0,this.state=_e.BOGUS_DOCTYPE,this._stateBogusDoctype(g)}}_stateBetweenDoctypePublicAndSystemIdentifiers(g){let _=this.currentToken;switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.GREATER_THAN_SIGN:{this.emitCurrentDoctype(_),this.state=_e.DATA;break}case ge.QUOTATION_MARK:{_.systemId="",this.state=_e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case ge.APOSTROPHE:{_.systemId="",this.state=_e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case ge.EOF:{this._err(Le.eofInDoctype),_.forceQuirks=!0,this.emitCurrentDoctype(_),this._emitEOFToken();break}default:this._err(Le.missingQuoteBeforeDoctypeSystemIdentifier),_.forceQuirks=!0,this.state=_e.BOGUS_DOCTYPE,this._stateBogusDoctype(g)}}_stateAfterDoctypeSystemKeyword(g){let _=this.currentToken;switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this.state=_e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case ge.QUOTATION_MARK:{this._err(Le.missingWhitespaceAfterDoctypeSystemKeyword),_.systemId="",this.state=_e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case ge.APOSTROPHE:{this._err(Le.missingWhitespaceAfterDoctypeSystemKeyword),_.systemId="",this.state=_e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case ge.GREATER_THAN_SIGN:{this._err(Le.missingDoctypeSystemIdentifier),_.forceQuirks=!0,this.state=_e.DATA,this.emitCurrentDoctype(_);break}case ge.EOF:{this._err(Le.eofInDoctype),_.forceQuirks=!0,this.emitCurrentDoctype(_),this._emitEOFToken();break}default:this._err(Le.missingQuoteBeforeDoctypeSystemIdentifier),_.forceQuirks=!0,this.state=_e.BOGUS_DOCTYPE,this._stateBogusDoctype(g)}}_stateBeforeDoctypeSystemIdentifier(g){let _=this.currentToken;switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.QUOTATION_MARK:{_.systemId="",this.state=_e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case ge.APOSTROPHE:{_.systemId="",this.state=_e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case ge.GREATER_THAN_SIGN:{this._err(Le.missingDoctypeSystemIdentifier),_.forceQuirks=!0,this.state=_e.DATA,this.emitCurrentDoctype(_);break}case ge.EOF:{this._err(Le.eofInDoctype),_.forceQuirks=!0,this.emitCurrentDoctype(_),this._emitEOFToken();break}default:this._err(Le.missingQuoteBeforeDoctypeSystemIdentifier),_.forceQuirks=!0,this.state=_e.BOGUS_DOCTYPE,this._stateBogusDoctype(g)}}_stateDoctypeSystemIdentifierDoubleQuoted(g){let _=this.currentToken;switch(g){case ge.QUOTATION_MARK:{this.state=_e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),_.systemId+=In;break}case ge.GREATER_THAN_SIGN:{this._err(Le.abruptDoctypeSystemIdentifier),_.forceQuirks=!0,this.emitCurrentDoctype(_),this.state=_e.DATA;break}case ge.EOF:{this._err(Le.eofInDoctype),_.forceQuirks=!0,this.emitCurrentDoctype(_),this._emitEOFToken();break}default:_.systemId+=String.fromCodePoint(g)}}_stateDoctypeSystemIdentifierSingleQuoted(g){let _=this.currentToken;switch(g){case ge.APOSTROPHE:{this.state=_e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case ge.NULL:{this._err(Le.unexpectedNullCharacter),_.systemId+=In;break}case ge.GREATER_THAN_SIGN:{this._err(Le.abruptDoctypeSystemIdentifier),_.forceQuirks=!0,this.emitCurrentDoctype(_),this.state=_e.DATA;break}case ge.EOF:{this._err(Le.eofInDoctype),_.forceQuirks=!0,this.emitCurrentDoctype(_),this._emitEOFToken();break}default:_.systemId+=String.fromCodePoint(g)}}_stateAfterDoctypeSystemIdentifier(g){let _=this.currentToken;switch(g){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.GREATER_THAN_SIGN:{this.emitCurrentDoctype(_),this.state=_e.DATA;break}case ge.EOF:{this._err(Le.eofInDoctype),_.forceQuirks=!0,this.emitCurrentDoctype(_),this._emitEOFToken();break}default:this._err(Le.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=_e.BOGUS_DOCTYPE,this._stateBogusDoctype(g)}}_stateBogusDoctype(g){let _=this.currentToken;switch(g){case ge.GREATER_THAN_SIGN:{this.emitCurrentDoctype(_),this.state=_e.DATA;break}case ge.NULL:{this._err(Le.unexpectedNullCharacter);break}case ge.EOF:{this.emitCurrentDoctype(_),this._emitEOFToken();break}default:}}_stateCdataSection(g){switch(g){case ge.RIGHT_SQUARE_BRACKET:{this.state=_e.CDATA_SECTION_BRACKET;break}case ge.EOF:{this._err(Le.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(g)}}_stateCdataSectionBracket(g){if(g===ge.RIGHT_SQUARE_BRACKET)this.state=_e.CDATA_SECTION_END;else this._emitChars("]"),this.state=_e.CDATA_SECTION,this._stateCdataSection(g)}_stateCdataSectionEnd(g){switch(g){case ge.GREATER_THAN_SIGN:{this.state=_e.DATA;break}case ge.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=_e.CDATA_SECTION,this._stateCdataSection(g)}}_stateCharacterReference(){let g=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(g<0)if(this.preprocessor.lastChunkWritten)g=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}if(g===0)this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(ge.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&vI(this.preprocessor.peek(1))?_e.AMBIGUOUS_AMPERSAND:this.returnState;else this.state=this.returnState}_stateAmbiguousAmpersand(g){if(vI(g))this._flushCodePointConsumedAsCharacterReference(g);else{if(g===ge.SEMICOLON)this._err(Le.unknownNamedCharacterReference);this.state=this.returnState,this._callState(g)}}}var wI=new Set([J.DD,J.DT,J.LI,J.OPTGROUP,J.OPTION,J.P,J.RB,J.RP,J.RT,J.RTC]),kI=new Set([...wI,J.CAPTION,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]),wf=new Set([J.APPLET,J.CAPTION,J.HTML,J.MARQUEE,J.OBJECT,J.TABLE,J.TD,J.TEMPLATE,J.TH]),B$=new Set([...wf,J.OL,J.UL]),H$=new Set([...wf,J.BUTTON]),II=new Set([J.ANNOTATION_XML,J.MI,J.MN,J.MO,J.MS,J.MTEXT]),CI=new Set([J.DESC,J.FOREIGN_OBJECT,J.TITLE]),q$=new Set([J.TR,J.TEMPLATE,J.HTML]),j$=new Set([J.TBODY,J.TFOOT,J.THEAD,J.TEMPLATE,J.HTML]),Z$=new Set([J.TABLE,J.TEMPLATE,J.HTML]),V$=new Set([J.TD,J.TH]);class Bb{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(g,_,E){this.treeAdapter=_,this.handler=E,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=J.UNKNOWN,this.current=g}_indexOf(g){return this.items.lastIndexOf(g,this.stackTop)}_isInTemplate(){return this.currentTagId===J.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Qe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(g,_){if(this.stackTop++,this.items[this.stackTop]=g,this.current=g,this.tagIDs[this.stackTop]=_,this.currentTagId=_,this._isInTemplate())this.tmplCount++;this.handler.onItemPush(g,_,!0)}pop(){let g=this.current;if(this.tmplCount>0&&this._isInTemplate())this.tmplCount--;this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(g,!0)}replace(g,_){let E=this._indexOf(g);if(this.items[E]=_,E===this.stackTop)this.current=_}insertAfter(g,_,E){let T=this._indexOf(g)+1;if(this.items.splice(T,0,_),this.tagIDs.splice(T,0,E),this.stackTop++,T===this.stackTop)this._updateCurrentElement();if(this.current&&this.currentTagId!==void 0)this.handler.onItemPush(this.current,this.currentTagId,T===this.stackTop)}popUntilTagNamePopped(g){let _=this.stackTop+1;do _=this.tagIDs.lastIndexOf(g,_-1);while(_>0&&this.treeAdapter.getNamespaceURI(this.items[_])!==Qe.HTML);this.shortenToLength(Math.max(_,0))}shortenToLength(g){while(this.stackTop>=g){let _=this.current;if(this.tmplCount>0&&this._isInTemplate())this.tmplCount-=1;this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(_,this.stackTop<g)}}popUntilElementPopped(g){let _=this._indexOf(g);this.shortenToLength(Math.max(_,0))}popUntilPopped(g,_){let E=this._indexOfTagNames(g,_);this.shortenToLength(Math.max(E,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(xd,Qe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(V$,Qe.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(g,_){for(let E=this.stackTop;E>=0;E--)if(g.has(this.tagIDs[E])&&this.treeAdapter.getNamespaceURI(this.items[E])===_)return E;return-1}clearBackTo(g,_){let E=this._indexOfTagNames(g,_);this.shortenToLength(E+1)}clearBackToTableContext(){this.clearBackTo(Z$,Qe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(j$,Qe.HTML)}clearBackToTableRowContext(){this.clearBackTo(q$,Qe.HTML)}remove(g){let _=this._indexOf(g);if(_>=0)if(_===this.stackTop)this.pop();else this.items.splice(_,1),this.tagIDs.splice(_,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(g,!1)}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===J.BODY?this.items[1]:null}contains(g){return this._indexOf(g)>-1}getCommonAncestor(g){let _=this._indexOf(g)-1;return _>=0?this.items[_]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===J.HTML}hasInDynamicScope(g,_){for(let E=this.stackTop;E>=0;E--){let T=this.tagIDs[E];switch(this.treeAdapter.getNamespaceURI(this.items[E])){case Qe.HTML:{if(T===g)return!0;if(_.has(T))return!1;break}case Qe.SVG:{if(CI.has(T))return!1;break}case Qe.MATHML:{if(II.has(T))return!1;break}}}return!0}hasInScope(g){return this.hasInDynamicScope(g,wf)}hasInListItemScope(g){return this.hasInDynamicScope(g,B$)}hasInButtonScope(g){return this.hasInDynamicScope(g,H$)}hasNumberedHeaderInScope(){for(let g=this.stackTop;g>=0;g--){let _=this.tagIDs[g];switch(this.treeAdapter.getNamespaceURI(this.items[g])){case Qe.HTML:{if(xd.has(_))return!0;if(wf.has(_))return!1;break}case Qe.SVG:{if(CI.has(_))return!1;break}case Qe.MATHML:{if(II.has(_))return!1;break}}}return!0}hasInTableScope(g){for(let _=this.stackTop;_>=0;_--){if(this.treeAdapter.getNamespaceURI(this.items[_])!==Qe.HTML)continue;switch(this.tagIDs[_]){case g:return!0;case J.TABLE:case J.HTML:return!1}}return!0}hasTableBodyContextInTableScope(){for(let g=this.stackTop;g>=0;g--){if(this.treeAdapter.getNamespaceURI(this.items[g])!==Qe.HTML)continue;switch(this.tagIDs[g]){case J.TBODY:case J.THEAD:case J.TFOOT:return!0;case J.TABLE:case J.HTML:return!1}}return!0}hasInSelectScope(g){for(let _=this.stackTop;_>=0;_--){if(this.treeAdapter.getNamespaceURI(this.items[_])!==Qe.HTML)continue;switch(this.tagIDs[_]){case g:return!0;case J.OPTION:case J.OPTGROUP:break;default:return!1}}return!0}generateImpliedEndTags(){while(this.currentTagId!==void 0&&wI.has(this.currentTagId))this.pop()}generateImpliedEndTagsThoroughly(){while(this.currentTagId!==void 0&&kI.has(this.currentTagId))this.pop()}generateImpliedEndTagsWithExclusion(g){while(this.currentTagId!==void 0&&this.currentTagId!==g&&kI.has(this.currentTagId))this.pop()}}var Io;(function(g){g[g.Marker=0]="Marker",g[g.Element=1]="Element"})(Io||(Io={}));var AI={type:Io.Marker};class Hb{constructor(g){this.treeAdapter=g,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(g,_){let E=[],T=_.length,R=this.treeAdapter.getTagName(g),w=this.treeAdapter.getNamespaceURI(g);for(let B=0;B<this.entries.length;B++){let Z=this.entries[B];if(Z.type===Io.Marker)break;let{element:K}=Z;if(this.treeAdapter.getTagName(K)===R&&this.treeAdapter.getNamespaceURI(K)===w){let X=this.treeAdapter.getAttrList(K);if(X.length===T)E.push({idx:B,attrs:X})}}return E}_ensureNoahArkCondition(g){if(this.entries.length<3)return;let _=this.treeAdapter.getAttrList(g),E=this._getNoahArkConditionCandidates(g,_);if(E.length<3)return;let T=new Map(_.map((w)=>[w.name,w.value])),R=0;for(let w=0;w<E.length;w++){let B=E[w];if(B.attrs.every((Z)=>T.get(Z.name)===Z.value)){if(R+=1,R>=3)this.entries.splice(B.idx,1)}}}insertMarker(){this.entries.unshift(AI)}pushElement(g,_){this._ensureNoahArkCondition(g),this.entries.unshift({type:Io.Element,element:g,token:_})}insertElementAfterBookmark(g,_){let E=this.entries.indexOf(this.bookmark);this.entries.splice(E,0,{type:Io.Element,element:g,token:_})}removeEntry(g){let _=this.entries.indexOf(g);if(_!==-1)this.entries.splice(_,1)}clearToLastMarker(){let g=this.entries.indexOf(AI);if(g===-1)this.entries.length=0;else this.entries.splice(0,g+1)}getElementEntryInScopeWithTagName(g){let _=this.entries.find((E)=>E.type===Io.Marker||this.treeAdapter.getTagName(E.element)===g);return _&&_.type===Io.Element?_:null}getElementEntry(g){return this.entries.find((_)=>_.type===Io.Element&&_.element===g)}}var Ao={createDocument(){return{nodeName:"#document",mode:Ar.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(g,_,E){return{nodeName:g,tagName:g,attrs:E,namespaceURI:_,childNodes:[],parentNode:null}},createCommentNode(g){return{nodeName:"#comment",data:g,parentNode:null}},createTextNode(g){return{nodeName:"#text",value:g,parentNode:null}},appendChild(g,_){g.childNodes.push(_),_.parentNode=g},insertBefore(g,_,E){let T=g.childNodes.indexOf(E);g.childNodes.splice(T,0,_),_.parentNode=g},setTemplateContent(g,_){g.content=_},getTemplateContent(g){return g.content},setDocumentType(g,_,E,T){let R=g.childNodes.find((w)=>w.nodeName==="#documentType");if(R)R.name=_,R.publicId=E,R.systemId=T;else{let w={nodeName:"#documentType",name:_,publicId:E,systemId:T,parentNode:null};Ao.appendChild(g,w)}},setDocumentMode(g,_){g.mode=_},getDocumentMode(g){return g.mode},detachNode(g){if(g.parentNode){let _=g.parentNode.childNodes.indexOf(g);g.parentNode.childNodes.splice(_,1),g.parentNode=null}},insertText(g,_){if(g.childNodes.length>0){let E=g.childNodes[g.childNodes.length-1];if(Ao.isTextNode(E)){E.value+=_;return}}Ao.appendChild(g,Ao.createTextNode(_))},insertTextBefore(g,_,E){let T=g.childNodes[g.childNodes.indexOf(E)-1];if(T&&Ao.isTextNode(T))T.value+=_;else Ao.insertBefore(g,Ao.createTextNode(_),E)},adoptAttributes(g,_){let E=new Set(g.attrs.map((T)=>T.name));for(let T=0;T<_.length;T++)if(!E.has(_[T].name))g.attrs.push(_[T])},getFirstChild(g){return g.childNodes[0]},getChildNodes(g){return g.childNodes},getParentNode(g){return g.parentNode},getAttrList(g){return g.attrs},getTagName(g){return g.tagName},getNamespaceURI(g){return g.namespaceURI},getTextNodeContent(g){return g.value},getCommentNodeContent(g){return g.data},getDocumentTypeNodeName(g){return g.name},getDocumentTypeNodePublicId(g){return g.publicId},getDocumentTypeNodeSystemId(g){return g.systemId},isTextNode(g){return g.nodeName==="#text"},isCommentNode(g){return g.nodeName==="#comment"},isDocumentTypeNode(g){return g.nodeName==="#documentType"},isElementNode(g){return Object.prototype.hasOwnProperty.call(g,"tagName")},setNodeSourceCodeLocation(g,_){g.sourceCodeLocation=_},getNodeSourceCodeLocation(g){return g.sourceCodeLocation},updateNodeSourceCodeLocation(g,_){g.sourceCodeLocation={...g.sourceCodeLocation,..._}}};var zI="html",G$="about:legacy-compat",Y$="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",NI=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],W$=[...NI,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],K$=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),OI=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],J$=[...OI,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function PI(g,_){return _.some((E)=>g.startsWith(E))}function MI(g){return g.name===zI&&g.publicId===null&&(g.systemId===null||g.systemId===G$)}function LI(g){if(g.name!==zI)return Ar.QUIRKS;let{systemId:_}=g;if(_&&_.toLowerCase()===Y$)return Ar.QUIRKS;let{publicId:E}=g;if(E!==null){if(E=E.toLowerCase(),K$.has(E))return Ar.QUIRKS;let T=_===null?W$:NI;if(PI(E,T))return Ar.QUIRKS;if(T=_===null?OI:J$,PI(E,T))return Ar.LIMITED_QUIRKS}return Ar.NO_QUIRKS}var DI={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Q$="definitionurl",e9="definitionURL",t9=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((g)=>[g.toLowerCase(),g])),n9=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Qe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Qe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Qe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Qe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Qe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Qe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Qe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:Qe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Qe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Qe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Qe.XMLNS}]]),r9=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((g)=>[g.toLowerCase(),g])),o9=new Set([J.B,J.BIG,J.BLOCKQUOTE,J.BODY,J.BR,J.CENTER,J.CODE,J.DD,J.DIV,J.DL,J.DT,J.EM,J.EMBED,J.H1,J.H2,J.H3,J.H4,J.H5,J.H6,J.HEAD,J.HR,J.I,J.IMG,J.LI,J.LISTING,J.MENU,J.META,J.NOBR,J.OL,J.P,J.PRE,J.RUBY,J.S,J.SMALL,J.SPAN,J.STRONG,J.STRIKE,J.SUB,J.SUP,J.TABLE,J.TT,J.U,J.UL,J.VAR]);function $I(g){let _=g.tagID;return _===J.FONT&&g.attrs.some(({name:T})=>T===yi.COLOR||T===yi.SIZE||T===yi.FACE)||o9.has(_)}function qb(g){for(let _=0;_<g.attrs.length;_++)if(g.attrs[_].name===Q$){g.attrs[_].name=e9;break}}function jb(g){for(let _=0;_<g.attrs.length;_++){let E=t9.get(g.attrs[_].name);if(E!=null)g.attrs[_].name=E}}function Af(g){for(let _=0;_<g.attrs.length;_++){let E=n9.get(g.attrs[_].name);if(E)g.attrs[_].prefix=E.prefix,g.attrs[_].name=E.name,g.attrs[_].namespace=E.namespace}}function UI(g){let _=r9.get(g.tagName);if(_!=null)g.tagName=_,g.tagID=vi(g.tagName)}function i9(g,_){return _===Qe.MATHML&&(g===J.MI||g===J.MO||g===J.MN||g===J.MS||g===J.MTEXT)}function s9(g,_,E){if(_===Qe.MATHML&&g===J.ANNOTATION_XML){for(let T=0;T<E.length;T++)if(E[T].name===yi.ENCODING){let R=E[T].value.toLowerCase();return R===DI.TEXT_HTML||R===DI.APPLICATION_XML}}return _===Qe.SVG&&(g===J.FOREIGN_OBJECT||g===J.DESC||g===J.TITLE)}function FI(g,_,E,T){return(!T||T===Qe.HTML)&&s9(g,_,E)||(!T||T===Qe.MATHML)&&i9(g,_)}var a9="hidden",u9=8,c9=3,Te;(function(g){g[g.INITIAL=0]="INITIAL",g[g.BEFORE_HTML=1]="BEFORE_HTML",g[g.BEFORE_HEAD=2]="BEFORE_HEAD",g[g.IN_HEAD=3]="IN_HEAD",g[g.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",g[g.AFTER_HEAD=5]="AFTER_HEAD",g[g.IN_BODY=6]="IN_BODY",g[g.TEXT=7]="TEXT",g[g.IN_TABLE=8]="IN_TABLE",g[g.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",g[g.IN_CAPTION=10]="IN_CAPTION",g[g.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",g[g.IN_TABLE_BODY=12]="IN_TABLE_BODY",g[g.IN_ROW=13]="IN_ROW",g[g.IN_CELL=14]="IN_CELL",g[g.IN_SELECT=15]="IN_SELECT",g[g.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",g[g.IN_TEMPLATE=17]="IN_TEMPLATE",g[g.AFTER_BODY=18]="AFTER_BODY",g[g.IN_FRAMESET=19]="IN_FRAMESET",g[g.AFTER_FRAMESET=20]="AFTER_FRAMESET",g[g.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",g[g.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(Te||(Te={}));var l9={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ZI=new Set([J.TABLE,J.TBODY,J.TFOOT,J.THEAD,J.TR]),HI={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ao,onParseError:null};class ou{constructor(g,_,E=null,T=null){if(this.fragmentContext=E,this.scriptHandler=T,this.currentToken=null,this.stopped=!1,this.insertionMode=Te.INITIAL,this.originalInsertionMode=Te.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...HI,...g},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError)this.options.sourceCodeLocationInfo=!0;this.document=_!==null&&_!==void 0?_:this.treeAdapter.createDocument(),this.tokenizer=new Cf(this.options,this),this.activeFormattingElements=new Hb(this.treeAdapter),this.fragmentContextID=E?vi(this.treeAdapter.getTagName(E)):J.UNKNOWN,this._setContextModes(E!==null&&E!==void 0?E:this.document,this.fragmentContextID),this.openElements=new Bb(this.document,this.treeAdapter,this)}static parse(g,_){let E=new this(_);return E.tokenizer.write(g,!0),E.document}static getFragmentParser(g,_){let E={...HI,..._};g!==null&&g!==void 0||(g=E.treeAdapter.createElement(ze.TEMPLATE,Qe.HTML,[]));let T=E.treeAdapter.createElement("documentmock",Qe.HTML,[]),R=new this(E,T,g);if(R.fragmentContextID===J.TEMPLATE)R.tmplInsertionModeStack.unshift(Te.IN_TEMPLATE);return R._initTokenizerForFragmentParsing(),R._insertFakeRootElement(),R._resetInsertionMode(),R._findFormInFragmentContext(),R}getFragment(){let g=this.treeAdapter.getFirstChild(this.document),_=this.treeAdapter.createDocumentFragment();return this._adoptNodes(g,_),_}_err(g,_,E){var T;if(!this.onParseError)return;let R=(T=g.location)!==null&&T!==void 0?T:l9,w={code:_,startLine:R.startLine,startCol:R.startCol,startOffset:R.startOffset,endLine:E?R.startLine:R.endLine,endCol:E?R.startCol:R.endCol,endOffset:E?R.startOffset:R.endOffset};this.onParseError(w)}onItemPush(g,_,E){var T,R;if((R=(T=this.treeAdapter).onItemPush)===null||R===void 0||R.call(T,g),E&&this.openElements.stackTop>0)this._setContextModes(g,_)}onItemPop(g,_){var E,T;if(this.options.sourceCodeLocationInfo)this._setEndLocation(g,this.currentToken);if((T=(E=this.treeAdapter).onItemPop)===null||T===void 0||T.call(E,g,this.openElements.current),_){let R,w;if(this.openElements.stackTop===0&&this.fragmentContext)R=this.fragmentContext,w=this.fragmentContextID;else({current:R,currentTagId:w}=this.openElements);this._setContextModes(R,w)}}_setContextModes(g,_){let E=g===this.document||g&&this.treeAdapter.getNamespaceURI(g)===Qe.HTML;this.currentNotInHTML=!E,this.tokenizer.inForeignNode=!E&&g!==void 0&&_!==void 0&&!this._isIntegrationPoint(_,g)}_switchToTextParsing(g,_){this._insertElement(g,Qe.HTML),this.tokenizer.state=_,this.originalInsertionMode=this.insertionMode,this.insertionMode=Te.TEXT}switchToPlaintextParsing(){this.insertionMode=Te.TEXT,this.originalInsertionMode=Te.IN_BODY,this.tokenizer.state=zn.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let g=this.fragmentContext;while(g){if(this.treeAdapter.getTagName(g)===ze.FORM){this.formElement=g;break}g=this.treeAdapter.getParentNode(g)}}_initTokenizerForFragmentParsing(){if(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==Qe.HTML)return;switch(this.fragmentContextID){case J.TITLE:case J.TEXTAREA:{this.tokenizer.state=zn.RCDATA;break}case J.STYLE:case J.XMP:case J.IFRAME:case J.NOEMBED:case J.NOFRAMES:case J.NOSCRIPT:{this.tokenizer.state=zn.RAWTEXT;break}case J.SCRIPT:{this.tokenizer.state=zn.SCRIPT_DATA;break}case J.PLAINTEXT:{this.tokenizer.state=zn.PLAINTEXT;break}default:}}_setDocumentType(g){let _=g.name||"",E=g.publicId||"",T=g.systemId||"";if(this.treeAdapter.setDocumentType(this.document,_,E,T),g.location){let w=this.treeAdapter.getChildNodes(this.document).find((B)=>this.treeAdapter.isDocumentTypeNode(B));if(w)this.treeAdapter.setNodeSourceCodeLocation(w,g.location)}}_attachElementToTree(g,_){if(this.options.sourceCodeLocationInfo){let E=_&&{..._,startTag:_};this.treeAdapter.setNodeSourceCodeLocation(g,E)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(g);else{let E=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(E!==null&&E!==void 0?E:this.document,g)}}_appendElement(g,_){let E=this.treeAdapter.createElement(g.tagName,_,g.attrs);this._attachElementToTree(E,g.location)}_insertElement(g,_){let E=this.treeAdapter.createElement(g.tagName,_,g.attrs);this._attachElementToTree(E,g.location),this.openElements.push(E,g.tagID)}_insertFakeElement(g,_){let E=this.treeAdapter.createElement(g,Qe.HTML,[]);this._attachElementToTree(E,null),this.openElements.push(E,_)}_insertTemplate(g){let _=this.treeAdapter.createElement(g.tagName,Qe.HTML,g.attrs),E=this.treeAdapter.createDocumentFragment();if(this.treeAdapter.setTemplateContent(_,E),this._attachElementToTree(_,g.location),this.openElements.push(_,g.tagID),this.options.sourceCodeLocationInfo)this.treeAdapter.setNodeSourceCodeLocation(E,null)}_insertFakeRootElement(){let g=this.treeAdapter.createElement(ze.HTML,Qe.HTML,[]);if(this.options.sourceCodeLocationInfo)this.treeAdapter.setNodeSourceCodeLocation(g,null);this.treeAdapter.appendChild(this.openElements.current,g),this.openElements.push(g,J.HTML)}_appendCommentNode(g,_){let E=this.treeAdapter.createCommentNode(g.data);if(this.treeAdapter.appendChild(_,E),this.options.sourceCodeLocationInfo)this.treeAdapter.setNodeSourceCodeLocation(E,g.location)}_insertCharacters(g){let _,E;if(this._shouldFosterParentOnInsertion())if({parent:_,beforeElement:E}=this._findFosterParentingLocation(),E)this.treeAdapter.insertTextBefore(_,g.chars,E);else this.treeAdapter.insertText(_,g.chars);else _=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(_,g.chars);if(!g.location)return;let T=this.treeAdapter.getChildNodes(_),R=E?T.lastIndexOf(E):T.length,w=T[R-1];if(this.treeAdapter.getNodeSourceCodeLocation(w)){let{endLine:Z,endCol:K,endOffset:X}=g.location;this.treeAdapter.updateNodeSourceCodeLocation(w,{endLine:Z,endCol:K,endOffset:X})}else if(this.options.sourceCodeLocationInfo)this.treeAdapter.setNodeSourceCodeLocation(w,g.location)}_adoptNodes(g,_){for(let E=this.treeAdapter.getFirstChild(g);E;E=this.treeAdapter.getFirstChild(g))this.treeAdapter.detachNode(E),this.treeAdapter.appendChild(_,E)}_setEndLocation(g,_){if(this.treeAdapter.getNodeSourceCodeLocation(g)&&_.location){let E=_.location,T=this.treeAdapter.getTagName(g),R=_.type===an.END_TAG&&T===_.tagName?{endTag:{...E},endLine:E.endLine,endCol:E.endCol,endOffset:E.endOffset}:{endLine:E.startLine,endCol:E.startCol,endOffset:E.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(g,R)}}shouldProcessStartTagTokenInForeignContent(g){if(!this.currentNotInHTML)return!1;let _,E;if(this.openElements.stackTop===0&&this.fragmentContext)_=this.fragmentContext,E=this.fragmentContextID;else({current:_,currentTagId:E}=this.openElements);if(g.tagID===J.SVG&&this.treeAdapter.getTagName(_)===ze.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(_)===Qe.MATHML)return!1;return this.tokenizer.inForeignNode||(g.tagID===J.MGLYPH||g.tagID===J.MALIGNMARK)&&E!==void 0&&!this._isIntegrationPoint(E,_,Qe.HTML)}_processToken(g){switch(g.type){case an.CHARACTER:{this.onCharacter(g);break}case an.NULL_CHARACTER:{this.onNullCharacter(g);break}case an.COMMENT:{this.onComment(g);break}case an.DOCTYPE:{this.onDoctype(g);break}case an.START_TAG:{this._processStartTag(g);break}case an.END_TAG:{this.onEndTag(g);break}case an.EOF:{this.onEof(g);break}case an.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(g);break}}}_isIntegrationPoint(g,_,E){let T=this.treeAdapter.getNamespaceURI(_),R=this.treeAdapter.getAttrList(_);return FI(g,T,R,E)}_reconstructActiveFormattingElements(){let g=this.activeFormattingElements.entries.length;if(g){let _=this.activeFormattingElements.entries.findIndex((T)=>T.type===Io.Marker||this.openElements.contains(T.element)),E=_===-1?g-1:_-1;for(let T=E;T>=0;T--){let R=this.activeFormattingElements.entries[T];this._insertElement(R.token,this.treeAdapter.getNamespaceURI(R.element)),R.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Te.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(J.P),this.openElements.popUntilTagNamePopped(J.P)}_resetInsertionMode(){for(let g=this.openElements.stackTop;g>=0;g--)switch(g===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[g]){case J.TR:{this.insertionMode=Te.IN_ROW;return}case J.TBODY:case J.THEAD:case J.TFOOT:{this.insertionMode=Te.IN_TABLE_BODY;return}case J.CAPTION:{this.insertionMode=Te.IN_CAPTION;return}case J.COLGROUP:{this.insertionMode=Te.IN_COLUMN_GROUP;return}case J.TABLE:{this.insertionMode=Te.IN_TABLE;return}case J.BODY:{this.insertionMode=Te.IN_BODY;return}case J.FRAMESET:{this.insertionMode=Te.IN_FRAMESET;return}case J.SELECT:{this._resetInsertionModeForSelect(g);return}case J.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case J.HTML:{this.insertionMode=this.headElement?Te.AFTER_HEAD:Te.BEFORE_HEAD;return}case J.TD:case J.TH:{if(g>0){this.insertionMode=Te.IN_CELL;return}break}case J.HEAD:{if(g>0){this.insertionMode=Te.IN_HEAD;return}break}}this.insertionMode=Te.IN_BODY}_resetInsertionModeForSelect(g){if(g>0)for(let _=g-1;_>0;_--){let E=this.openElements.tagIDs[_];if(E===J.TEMPLATE)break;else if(E===J.TABLE){this.insertionMode=Te.IN_SELECT_IN_TABLE;return}}this.insertionMode=Te.IN_SELECT}_isElementCausesFosterParenting(g){return ZI.has(g)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let g=this.openElements.stackTop;g>=0;g--){let _=this.openElements.items[g];switch(this.openElements.tagIDs[g]){case J.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(_)===Qe.HTML)return{parent:this.treeAdapter.getTemplateContent(_),beforeElement:null};break}case J.TABLE:{let E=this.treeAdapter.getParentNode(_);if(E)return{parent:E,beforeElement:_};return{parent:this.openElements.items[g-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(g){let _=this._findFosterParentingLocation();if(_.beforeElement)this.treeAdapter.insertBefore(_.parent,g,_.beforeElement);else this.treeAdapter.appendChild(_.parent,g)}_isSpecialElement(g,_){let E=this.treeAdapter.getNamespaceURI(g);return TI[E].has(_)}onCharacter(g){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){FU(this,g);return}switch(this.insertionMode){case Te.INITIAL:{kd(this,g);break}case Te.BEFORE_HTML:{Cd(this,g);break}case Te.BEFORE_HEAD:{wd(this,g);break}case Te.IN_HEAD:{Ad(this,g);break}case Te.IN_HEAD_NO_SCRIPT:{Pd(this,g);break}case Te.AFTER_HEAD:{zd(this,g);break}case Te.IN_BODY:case Te.IN_CAPTION:case Te.IN_CELL:case Te.IN_TEMPLATE:{GI(this,g);break}case Te.TEXT:case Te.IN_SELECT:case Te.IN_SELECT_IN_TABLE:{this._insertCharacters(g);break}case Te.IN_TABLE:case Te.IN_TABLE_BODY:case Te.IN_ROW:{Zb(this,g);break}case Te.IN_TABLE_TEXT:{QI(this,g);break}case Te.IN_COLUMN_GROUP:{zf(this,g);break}case Te.AFTER_BODY:{Nf(this,g);break}case Te.AFTER_AFTER_BODY:{Pf(this,g);break}default:}}onNullCharacter(g){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){UU(this,g);return}switch(this.insertionMode){case Te.INITIAL:{kd(this,g);break}case Te.BEFORE_HTML:{Cd(this,g);break}case Te.BEFORE_HEAD:{wd(this,g);break}case Te.IN_HEAD:{Ad(this,g);break}case Te.IN_HEAD_NO_SCRIPT:{Pd(this,g);break}case Te.AFTER_HEAD:{zd(this,g);break}case Te.TEXT:{this._insertCharacters(g);break}case Te.IN_TABLE:case Te.IN_TABLE_BODY:case Te.IN_ROW:{Zb(this,g);break}case Te.IN_COLUMN_GROUP:{zf(this,g);break}case Te.AFTER_BODY:{Nf(this,g);break}case Te.AFTER_AFTER_BODY:{Pf(this,g);break}default:}}onComment(g){if(this.skipNextNewLine=!1,this.currentNotInHTML){Vb(this,g);return}switch(this.insertionMode){case Te.INITIAL:case Te.BEFORE_HTML:case Te.BEFORE_HEAD:case Te.IN_HEAD:case Te.IN_HEAD_NO_SCRIPT:case Te.AFTER_HEAD:case Te.IN_BODY:case Te.IN_TABLE:case Te.IN_CAPTION:case Te.IN_COLUMN_GROUP:case Te.IN_TABLE_BODY:case Te.IN_ROW:case Te.IN_CELL:case Te.IN_SELECT:case Te.IN_SELECT_IN_TABLE:case Te.IN_TEMPLATE:case Te.IN_FRAMESET:case Te.AFTER_FRAMESET:{Vb(this,g);break}case Te.IN_TABLE_TEXT:{Id(this,g);break}case Te.AFTER_BODY:{b9(this,g);break}case Te.AFTER_AFTER_BODY:case Te.AFTER_AFTER_FRAMESET:{S9(this,g);break}default:}}onDoctype(g){switch(this.skipNextNewLine=!1,this.insertionMode){case Te.INITIAL:{_9(this,g);break}case Te.BEFORE_HEAD:case Te.IN_HEAD:case Te.IN_HEAD_NO_SCRIPT:case Te.AFTER_HEAD:{this._err(g,Le.misplacedDoctype);break}case Te.IN_TABLE_TEXT:{Id(this,g);break}default:}}onStartTag(g){if(this.skipNextNewLine=!1,this.currentToken=g,this._processStartTag(g),g.selfClosing&&!g.ackSelfClosing)this._err(g,Le.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(g){if(this.shouldProcessStartTagTokenInForeignContent(g))BU(this,g);else this._startTagOutsideForeignContent(g)}_startTagOutsideForeignContent(g){switch(this.insertionMode){case Te.INITIAL:{kd(this,g);break}case Te.BEFORE_HTML:{E9(this,g);break}case Te.BEFORE_HEAD:{y9(this,g);break}case Te.IN_HEAD:{$o(this,g);break}case Te.IN_HEAD_NO_SCRIPT:{R9(this,g);break}case Te.AFTER_HEAD:{I9(this,g);break}case Te.IN_BODY:{Tr(this,g);break}case Te.IN_TABLE:{ru(this,g);break}case Te.IN_TABLE_TEXT:{Id(this,g);break}case Te.IN_CAPTION:{vU(this,g);break}case Te.IN_COLUMN_GROUP:{Kb(this,g);break}case Te.IN_TABLE_BODY:{Lf(this,g);break}case Te.IN_ROW:{Df(this,g);break}case Te.IN_CELL:{kU(this,g);break}case Te.IN_SELECT:{nC(this,g);break}case Te.IN_SELECT_IN_TABLE:{CU(this,g);break}case Te.IN_TEMPLATE:{AU(this,g);break}case Te.AFTER_BODY:{zU(this,g);break}case Te.IN_FRAMESET:{NU(this,g);break}case Te.AFTER_FRAMESET:{MU(this,g);break}case Te.AFTER_AFTER_BODY:{DU(this,g);break}case Te.AFTER_AFTER_FRAMESET:{$U(this,g);break}default:}}onEndTag(g){if(this.skipNextNewLine=!1,this.currentToken=g,this.currentNotInHTML)HU(this,g);else this._endTagOutsideForeignContent(g)}_endTagOutsideForeignContent(g){switch(this.insertionMode){case Te.INITIAL:{kd(this,g);break}case Te.BEFORE_HTML:{T9(this,g);break}case Te.BEFORE_HEAD:{v9(this,g);break}case Te.IN_HEAD:{x9(this,g);break}case Te.IN_HEAD_NO_SCRIPT:{k9(this,g);break}case Te.AFTER_HEAD:{C9(this,g);break}case Te.IN_BODY:{Mf(this,g);break}case Te.TEXT:{mU(this,g);break}case Te.IN_TABLE:{Nd(this,g);break}case Te.IN_TABLE_TEXT:{Id(this,g);break}case Te.IN_CAPTION:{xU(this,g);break}case Te.IN_COLUMN_GROUP:{RU(this,g);break}case Te.IN_TABLE_BODY:{Gb(this,g);break}case Te.IN_ROW:{tC(this,g);break}case Te.IN_CELL:{IU(this,g);break}case Te.IN_SELECT:{rC(this,g);break}case Te.IN_SELECT_IN_TABLE:{wU(this,g);break}case Te.IN_TEMPLATE:{PU(this,g);break}case Te.AFTER_BODY:{iC(this,g);break}case Te.IN_FRAMESET:{OU(this,g);break}case Te.AFTER_FRAMESET:{LU(this,g);break}case Te.AFTER_AFTER_BODY:{Pf(this,g);break}default:}}onEof(g){switch(this.insertionMode){case Te.INITIAL:{kd(this,g);break}case Te.BEFORE_HTML:{Cd(this,g);break}case Te.BEFORE_HEAD:{wd(this,g);break}case Te.IN_HEAD:{Ad(this,g);break}case Te.IN_HEAD_NO_SCRIPT:{Pd(this,g);break}case Te.AFTER_HEAD:{zd(this,g);break}case Te.IN_BODY:case Te.IN_TABLE:case Te.IN_CAPTION:case Te.IN_COLUMN_GROUP:case Te.IN_TABLE_BODY:case Te.IN_ROW:case Te.IN_CELL:case Te.IN_SELECT:case Te.IN_SELECT_IN_TABLE:{JI(this,g);break}case Te.TEXT:{fU(this,g);break}case Te.IN_TABLE_TEXT:{Id(this,g);break}case Te.IN_TEMPLATE:{oC(this,g);break}case Te.AFTER_BODY:case Te.IN_FRAMESET:case Te.AFTER_FRAMESET:case Te.AFTER_AFTER_BODY:case Te.AFTER_AFTER_FRAMESET:{Wb(this,g);break}default:}}onWhitespaceCharacter(g){if(this.skipNextNewLine){if(this.skipNextNewLine=!1,g.chars.charCodeAt(0)===ge.LINE_FEED){if(g.chars.length===1)return;g.chars=g.chars.substr(1)}}if(this.tokenizer.inForeignNode){this._insertCharacters(g);return}switch(this.insertionMode){case Te.IN_HEAD:case Te.IN_HEAD_NO_SCRIPT:case Te.AFTER_HEAD:case Te.TEXT:case Te.IN_COLUMN_GROUP:case Te.IN_SELECT:case Te.IN_SELECT_IN_TABLE:case Te.IN_FRAMESET:case Te.AFTER_FRAMESET:{this._insertCharacters(g);break}case Te.IN_BODY:case Te.IN_CAPTION:case Te.IN_CELL:case Te.IN_TEMPLATE:case Te.AFTER_BODY:case Te.AFTER_AFTER_BODY:case Te.AFTER_AFTER_FRAMESET:{VI(this,g);break}case Te.IN_TABLE:case Te.IN_TABLE_BODY:case Te.IN_ROW:{Zb(this,g);break}case Te.IN_TABLE_TEXT:{XI(this,g);break}default:}}}function d9(g,_){let E=g.activeFormattingElements.getElementEntryInScopeWithTagName(_.tagName);if(E){if(!g.openElements.contains(E.element))g.activeFormattingElements.removeEntry(E),E=null;else if(!g.openElements.hasInScope(_.tagID))E=null}else KI(g,_);return E}function p9(g,_){let E=null,T=g.openElements.stackTop;for(;T>=0;T--){let R=g.openElements.items[T];if(R===_.element)break;if(g._isSpecialElement(R,g.openElements.tagIDs[T]))E=R}if(!E)g.openElements.shortenToLength(Math.max(T,0)),g.activeFormattingElements.removeEntry(_);return E}function m9(g,_,E){let T=_,R=g.openElements.getCommonAncestor(_);for(let w=0,B=R;B!==E;w++,B=R){R=g.openElements.getCommonAncestor(B);let Z=g.activeFormattingElements.getElementEntry(B),K=Z&&w>=c9;if(!Z||K){if(K)g.activeFormattingElements.removeEntry(Z);g.openElements.remove(B)}else{if(B=f9(g,Z),T===_)g.activeFormattingElements.bookmark=Z;g.treeAdapter.detachNode(T),g.treeAdapter.appendChild(B,T),T=B}}return T}function f9(g,_){let E=g.treeAdapter.getNamespaceURI(_.element),T=g.treeAdapter.createElement(_.token.tagName,E,_.token.attrs);return g.openElements.replace(_.element,T),_.element=T,T}function h9(g,_,E){let T=g.treeAdapter.getTagName(_),R=vi(T);if(g._isElementCausesFosterParenting(R))g._fosterParentElement(E);else{let w=g.treeAdapter.getNamespaceURI(_);if(R===J.TEMPLATE&&w===Qe.HTML)_=g.treeAdapter.getTemplateContent(_);g.treeAdapter.appendChild(_,E)}}function g9(g,_,E){let T=g.treeAdapter.getNamespaceURI(E.element),{token:R}=E,w=g.treeAdapter.createElement(R.tagName,T,R.attrs);g._adoptNodes(_,w),g.treeAdapter.appendChild(_,w),g.activeFormattingElements.insertElementAfterBookmark(w,R),g.activeFormattingElements.removeEntry(E),g.openElements.remove(E.element),g.openElements.insertAfter(_,w,R.tagID)}function Yb(g,_){for(let E=0;E<u9;E++){let T=d9(g,_);if(!T)break;let R=p9(g,T);if(!R)break;g.activeFormattingElements.bookmark=T;let w=m9(g,R,T.element),B=g.openElements.getCommonAncestor(T.element);if(g.treeAdapter.detachNode(w),B)h9(g,B,w);g9(g,R,T)}}function Vb(g,_){g._appendCommentNode(_,g.openElements.currentTmplContentOrNode)}function b9(g,_){g._appendCommentNode(_,g.openElements.items[0])}function S9(g,_){g._appendCommentNode(_,g.document)}function Wb(g,_){if(g.stopped=!0,_.location){let E=g.fragmentContext?0:2;for(let T=g.openElements.stackTop;T>=E;T--)g._setEndLocation(g.openElements.items[T],_);if(!g.fragmentContext&&g.openElements.stackTop>=0){let T=g.openElements.items[0],R=g.treeAdapter.getNodeSourceCodeLocation(T);if(R&&!R.endTag){if(g._setEndLocation(T,_),g.openElements.stackTop>=1){let w=g.openElements.items[1],B=g.treeAdapter.getNodeSourceCodeLocation(w);if(B&&!B.endTag)g._setEndLocation(w,_)}}}}}function _9(g,_){g._setDocumentType(_);let E=_.forceQuirks?Ar.QUIRKS:LI(_);if(!MI(_))g._err(_,Le.nonConformingDoctype);g.treeAdapter.setDocumentMode(g.document,E),g.insertionMode=Te.BEFORE_HTML}function kd(g,_){g._err(_,Le.missingDoctype,!0),g.treeAdapter.setDocumentMode(g.document,Ar.QUIRKS),g.insertionMode=Te.BEFORE_HTML,g._processToken(_)}function E9(g,_){if(_.tagID===J.HTML)g._insertElement(_,Qe.HTML),g.insertionMode=Te.BEFORE_HEAD;else Cd(g,_)}function T9(g,_){let E=_.tagID;if(E===J.HTML||E===J.HEAD||E===J.BODY||E===J.BR)Cd(g,_)}function Cd(g,_){g._insertFakeRootElement(),g.insertionMode=Te.BEFORE_HEAD,g._processToken(_)}function y9(g,_){switch(_.tagID){case J.HTML:{Tr(g,_);break}case J.HEAD:{g._insertElement(_,Qe.HTML),g.headElement=g.openElements.current,g.insertionMode=Te.IN_HEAD;break}default:wd(g,_)}}function v9(g,_){let E=_.tagID;if(E===J.HEAD||E===J.BODY||E===J.HTML||E===J.BR)wd(g,_);else g._err(_,Le.endTagWithoutMatchingOpenElement)}function wd(g,_){g._insertFakeElement(ze.HEAD,J.HEAD),g.headElement=g.openElements.current,g.insertionMode=Te.IN_HEAD,g._processToken(_)}function $o(g,_){switch(_.tagID){case J.HTML:{Tr(g,_);break}case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:{g._appendElement(_,Qe.HTML),_.ackSelfClosing=!0;break}case J.TITLE:{g._switchToTextParsing(_,zn.RCDATA);break}case J.NOSCRIPT:{if(g.options.scriptingEnabled)g._switchToTextParsing(_,zn.RAWTEXT);else g._insertElement(_,Qe.HTML),g.insertionMode=Te.IN_HEAD_NO_SCRIPT;break}case J.NOFRAMES:case J.STYLE:{g._switchToTextParsing(_,zn.RAWTEXT);break}case J.SCRIPT:{g._switchToTextParsing(_,zn.SCRIPT_DATA);break}case J.TEMPLATE:{g._insertTemplate(_),g.activeFormattingElements.insertMarker(),g.framesetOk=!1,g.insertionMode=Te.IN_TEMPLATE,g.tmplInsertionModeStack.unshift(Te.IN_TEMPLATE);break}case J.HEAD:{g._err(_,Le.misplacedStartTagForHeadElement);break}default:Ad(g,_)}}function x9(g,_){switch(_.tagID){case J.HEAD:{g.openElements.pop(),g.insertionMode=Te.AFTER_HEAD;break}case J.BODY:case J.BR:case J.HTML:{Ad(g,_);break}case J.TEMPLATE:{Ks(g,_);break}default:g._err(_,Le.endTagWithoutMatchingOpenElement)}}function Ks(g,_){if(g.openElements.tmplCount>0){if(g.openElements.generateImpliedEndTagsThoroughly(),g.openElements.currentTagId!==J.TEMPLATE)g._err(_,Le.closingOfElementWithOpenChildElements);g.openElements.popUntilTagNamePopped(J.TEMPLATE),g.activeFormattingElements.clearToLastMarker(),g.tmplInsertionModeStack.shift(),g._resetInsertionMode()}else g._err(_,Le.endTagWithoutMatchingOpenElement)}function Ad(g,_){g.openElements.pop(),g.insertionMode=Te.AFTER_HEAD,g._processToken(_)}function R9(g,_){switch(_.tagID){case J.HTML:{Tr(g,_);break}case J.BASEFONT:case J.BGSOUND:case J.HEAD:case J.LINK:case J.META:case J.NOFRAMES:case J.STYLE:{$o(g,_);break}case J.NOSCRIPT:{g._err(_,Le.nestedNoscriptInHead);break}default:Pd(g,_)}}function k9(g,_){switch(_.tagID){case J.NOSCRIPT:{g.openElements.pop(),g.insertionMode=Te.IN_HEAD;break}case J.BR:{Pd(g,_);break}default:g._err(_,Le.endTagWithoutMatchingOpenElement)}}function Pd(g,_){let E=_.type===an.EOF?Le.openElementsLeftAfterEof:Le.disallowedContentInNoscriptInHead;g._err(_,E),g.openElements.pop(),g.insertionMode=Te.IN_HEAD,g._processToken(_)}function I9(g,_){switch(_.tagID){case J.HTML:{Tr(g,_);break}case J.BODY:{g._insertElement(_,Qe.HTML),g.framesetOk=!1,g.insertionMode=Te.IN_BODY;break}case J.FRAMESET:{g._insertElement(_,Qe.HTML),g.insertionMode=Te.IN_FRAMESET;break}case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:case J.NOFRAMES:case J.SCRIPT:case J.STYLE:case J.TEMPLATE:case J.TITLE:{g._err(_,Le.abandonedHeadElementChild),g.openElements.push(g.headElement,J.HEAD),$o(g,_),g.openElements.remove(g.headElement);break}case J.HEAD:{g._err(_,Le.misplacedStartTagForHeadElement);break}default:zd(g,_)}}function C9(g,_){switch(_.tagID){case J.BODY:case J.HTML:case J.BR:{zd(g,_);break}case J.TEMPLATE:{Ks(g,_);break}default:g._err(_,Le.endTagWithoutMatchingOpenElement)}}function zd(g,_){g._insertFakeElement(ze.BODY,J.BODY),g.insertionMode=Te.IN_BODY,Of(g,_)}function Of(g,_){switch(_.type){case an.CHARACTER:{GI(g,_);break}case an.WHITESPACE_CHARACTER:{VI(g,_);break}case an.COMMENT:{Vb(g,_);break}case an.START_TAG:{Tr(g,_);break}case an.END_TAG:{Mf(g,_);break}case an.EOF:{JI(g,_);break}default:}}function VI(g,_){g._reconstructActiveFormattingElements(),g._insertCharacters(_)}function GI(g,_){g._reconstructActiveFormattingElements(),g._insertCharacters(_),g.framesetOk=!1}function w9(g,_){if(g.openElements.tmplCount===0)g.treeAdapter.adoptAttributes(g.openElements.items[0],_.attrs)}function A9(g,_){let E=g.openElements.tryPeekProperlyNestedBodyElement();if(E&&g.openElements.tmplCount===0)g.framesetOk=!1,g.treeAdapter.adoptAttributes(E,_.attrs)}function P9(g,_){let E=g.openElements.tryPeekProperlyNestedBodyElement();if(g.framesetOk&&E)g.treeAdapter.detachNode(E),g.openElements.popAllUpToHtmlElement(),g._insertElement(_,Qe.HTML),g.insertionMode=Te.IN_FRAMESET}function z9(g,_){if(g.openElements.hasInButtonScope(J.P))g._closePElement();g._insertElement(_,Qe.HTML)}function N9(g,_){if(g.openElements.hasInButtonScope(J.P))g._closePElement();if(g.openElements.currentTagId!==void 0&&xd.has(g.openElements.currentTagId))g.openElements.pop();g._insertElement(_,Qe.HTML)}function O9(g,_){if(g.openElements.hasInButtonScope(J.P))g._closePElement();g._insertElement(_,Qe.HTML),g.skipNextNewLine=!0,g.framesetOk=!1}function M9(g,_){let E=g.openElements.tmplCount>0;if(!g.formElement||E){if(g.openElements.hasInButtonScope(J.P))g._closePElement();if(g._insertElement(_,Qe.HTML),!E)g.formElement=g.openElements.current}}function L9(g,_){g.framesetOk=!1;let E=_.tagID;for(let T=g.openElements.stackTop;T>=0;T--){let R=g.openElements.tagIDs[T];if(E===J.LI&&R===J.LI||(E===J.DD||E===J.DT)&&(R===J.DD||R===J.DT)){g.openElements.generateImpliedEndTagsWithExclusion(R),g.openElements.popUntilTagNamePopped(R);break}if(R!==J.ADDRESS&&R!==J.DIV&&R!==J.P&&g._isSpecialElement(g.openElements.items[T],R))break}if(g.openElements.hasInButtonScope(J.P))g._closePElement();g._insertElement(_,Qe.HTML)}function D9(g,_){if(g.openElements.hasInButtonScope(J.P))g._closePElement();g._insertElement(_,Qe.HTML),g.tokenizer.state=zn.PLAINTEXT}function $9(g,_){if(g.openElements.hasInScope(J.BUTTON))g.openElements.generateImpliedEndTags(),g.openElements.popUntilTagNamePopped(J.BUTTON);g._reconstructActiveFormattingElements(),g._insertElement(_,Qe.HTML),g.framesetOk=!1}function U9(g,_){let E=g.activeFormattingElements.getElementEntryInScopeWithTagName(ze.A);if(E)Yb(g,_),g.openElements.remove(E.element),g.activeFormattingElements.removeEntry(E);g._reconstructActiveFormattingElements(),g._insertElement(_,Qe.HTML),g.activeFormattingElements.pushElement(g.openElements.current,_)}function F9(g,_){g._reconstructActiveFormattingElements(),g._insertElement(_,Qe.HTML),g.activeFormattingElements.pushElement(g.openElements.current,_)}function B9(g,_){if(g._reconstructActiveFormattingElements(),g.openElements.hasInScope(J.NOBR))Yb(g,_),g._reconstructActiveFormattingElements();g._insertElement(_,Qe.HTML),g.activeFormattingElements.pushElement(g.openElements.current,_)}function H9(g,_){g._reconstructActiveFormattingElements(),g._insertElement(_,Qe.HTML),g.activeFormattingElements.insertMarker(),g.framesetOk=!1}function q9(g,_){if(g.treeAdapter.getDocumentMode(g.document)!==Ar.QUIRKS&&g.openElements.hasInButtonScope(J.P))g._closePElement();g._insertElement(_,Qe.HTML),g.framesetOk=!1,g.insertionMode=Te.IN_TABLE}function YI(g,_){g._reconstructActiveFormattingElements(),g._appendElement(_,Qe.HTML),g.framesetOk=!1,_.ackSelfClosing=!0}function WI(g){let _=kf(g,yi.TYPE);return _!=null&&_.toLowerCase()===a9}function j9(g,_){if(g._reconstructActiveFormattingElements(),g._appendElement(_,Qe.HTML),!WI(_))g.framesetOk=!1;_.ackSelfClosing=!0}function Z9(g,_){g._appendElement(_,Qe.HTML),_.ackSelfClosing=!0}function V9(g,_){if(g.openElements.hasInButtonScope(J.P))g._closePElement();g._appendElement(_,Qe.HTML),g.framesetOk=!1,_.ackSelfClosing=!0}function G9(g,_){_.tagName=ze.IMG,_.tagID=J.IMG,YI(g,_)}function Y9(g,_){g._insertElement(_,Qe.HTML),g.skipNextNewLine=!0,g.tokenizer.state=zn.RCDATA,g.originalInsertionMode=g.insertionMode,g.framesetOk=!1,g.insertionMode=Te.TEXT}function W9(g,_){if(g.openElements.hasInButtonScope(J.P))g._closePElement();g._reconstructActiveFormattingElements(),g.framesetOk=!1,g._switchToTextParsing(_,zn.RAWTEXT)}function K9(g,_){g.framesetOk=!1,g._switchToTextParsing(_,zn.RAWTEXT)}function qI(g,_){g._switchToTextParsing(_,zn.RAWTEXT)}function J9(g,_){g._reconstructActiveFormattingElements(),g._insertElement(_,Qe.HTML),g.framesetOk=!1,g.insertionMode=g.insertionMode===Te.IN_TABLE||g.insertionMode===Te.IN_CAPTION||g.insertionMode===Te.IN_TABLE_BODY||g.insertionMode===Te.IN_ROW||g.insertionMode===Te.IN_CELL?Te.IN_SELECT_IN_TABLE:Te.IN_SELECT}function X9(g,_){if(g.openElements.currentTagId===J.OPTION)g.openElements.pop();g._reconstructActiveFormattingElements(),g._insertElement(_,Qe.HTML)}function Q9(g,_){if(g.openElements.hasInScope(J.RUBY))g.openElements.generateImpliedEndTags();g._insertElement(_,Qe.HTML)}function eU(g,_){if(g.openElements.hasInScope(J.RUBY))g.openElements.generateImpliedEndTagsWithExclusion(J.RTC);g._insertElement(_,Qe.HTML)}function tU(g,_){if(g._reconstructActiveFormattingElements(),qb(_),Af(_),_.selfClosing)g._appendElement(_,Qe.MATHML);else g._insertElement(_,Qe.MATHML);_.ackSelfClosing=!0}function nU(g,_){if(g._reconstructActiveFormattingElements(),jb(_),Af(_),_.selfClosing)g._appendElement(_,Qe.SVG);else g._insertElement(_,Qe.SVG);_.ackSelfClosing=!0}function jI(g,_){g._reconstructActiveFormattingElements(),g._insertElement(_,Qe.HTML)}function Tr(g,_){switch(_.tagID){case J.I:case J.S:case J.B:case J.U:case J.EM:case J.TT:case J.BIG:case J.CODE:case J.FONT:case J.SMALL:case J.STRIKE:case J.STRONG:{F9(g,_);break}case J.A:{U9(g,_);break}case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:{N9(g,_);break}case J.P:case J.DL:case J.OL:case J.UL:case J.DIV:case J.DIR:case J.NAV:case J.MAIN:case J.MENU:case J.ASIDE:case J.CENTER:case J.FIGURE:case J.FOOTER:case J.HEADER:case J.HGROUP:case J.DIALOG:case J.DETAILS:case J.ADDRESS:case J.ARTICLE:case J.SEARCH:case J.SECTION:case J.SUMMARY:case J.FIELDSET:case J.BLOCKQUOTE:case J.FIGCAPTION:{z9(g,_);break}case J.LI:case J.DD:case J.DT:{L9(g,_);break}case J.BR:case J.IMG:case J.WBR:case J.AREA:case J.EMBED:case J.KEYGEN:{YI(g,_);break}case J.HR:{V9(g,_);break}case J.RB:case J.RTC:{Q9(g,_);break}case J.RT:case J.RP:{eU(g,_);break}case J.PRE:case J.LISTING:{O9(g,_);break}case J.XMP:{W9(g,_);break}case J.SVG:{nU(g,_);break}case J.HTML:{w9(g,_);break}case J.BASE:case J.LINK:case J.META:case J.STYLE:case J.TITLE:case J.SCRIPT:case J.BGSOUND:case J.BASEFONT:case J.TEMPLATE:{$o(g,_);break}case J.BODY:{A9(g,_);break}case J.FORM:{M9(g,_);break}case J.NOBR:{B9(g,_);break}case J.MATH:{tU(g,_);break}case J.TABLE:{q9(g,_);break}case J.INPUT:{j9(g,_);break}case J.PARAM:case J.TRACK:case J.SOURCE:{Z9(g,_);break}case J.IMAGE:{G9(g,_);break}case J.BUTTON:{$9(g,_);break}case J.APPLET:case J.OBJECT:case J.MARQUEE:{H9(g,_);break}case J.IFRAME:{K9(g,_);break}case J.SELECT:{J9(g,_);break}case J.OPTION:case J.OPTGROUP:{X9(g,_);break}case J.NOEMBED:case J.NOFRAMES:{qI(g,_);break}case J.FRAMESET:{P9(g,_);break}case J.TEXTAREA:{Y9(g,_);break}case J.NOSCRIPT:{if(g.options.scriptingEnabled)qI(g,_);else jI(g,_);break}case J.PLAINTEXT:{D9(g,_);break}case J.COL:case J.TH:case J.TD:case J.TR:case J.HEAD:case J.FRAME:case J.TBODY:case J.TFOOT:case J.THEAD:case J.CAPTION:case J.COLGROUP:break;default:jI(g,_)}}function rU(g,_){if(g.openElements.hasInScope(J.BODY)){if(g.insertionMode=Te.AFTER_BODY,g.options.sourceCodeLocationInfo){let E=g.openElements.tryPeekProperlyNestedBodyElement();if(E)g._setEndLocation(E,_)}}}function oU(g,_){if(g.openElements.hasInScope(J.BODY))g.insertionMode=Te.AFTER_BODY,iC(g,_)}function iU(g,_){let E=_.tagID;if(g.openElements.hasInScope(E))g.openElements.generateImpliedEndTags(),g.openElements.popUntilTagNamePopped(E)}function sU(g){let _=g.openElements.tmplCount>0,{formElement:E}=g;if(!_)g.formElement=null;if((E||_)&&g.openElements.hasInScope(J.FORM)){if(g.openElements.generateImpliedEndTags(),_)g.openElements.popUntilTagNamePopped(J.FORM);else if(E)g.openElements.remove(E)}}function aU(g){if(!g.openElements.hasInButtonScope(J.P))g._insertFakeElement(ze.P,J.P);g._closePElement()}function uU(g){if(g.openElements.hasInListItemScope(J.LI))g.openElements.generateImpliedEndTagsWithExclusion(J.LI),g.openElements.popUntilTagNamePopped(J.LI)}function cU(g,_){let E=_.tagID;if(g.openElements.hasInScope(E))g.openElements.generateImpliedEndTagsWithExclusion(E),g.openElements.popUntilTagNamePopped(E)}function lU(g){if(g.openElements.hasNumberedHeaderInScope())g.openElements.generateImpliedEndTags(),g.openElements.popUntilNumberedHeaderPopped()}function dU(g,_){let E=_.tagID;if(g.openElements.hasInScope(E))g.openElements.generateImpliedEndTags(),g.openElements.popUntilTagNamePopped(E),g.activeFormattingElements.clearToLastMarker()}function pU(g){g._reconstructActiveFormattingElements(),g._insertFakeElement(ze.BR,J.BR),g.openElements.pop(),g.framesetOk=!1}function KI(g,_){let{tagName:E,tagID:T}=_;for(let R=g.openElements.stackTop;R>0;R--){let w=g.openElements.items[R],B=g.openElements.tagIDs[R];if(T===B&&(T!==J.UNKNOWN||g.treeAdapter.getTagName(w)===E)){if(g.openElements.generateImpliedEndTagsWithExclusion(T),g.openElements.stackTop>=R)g.openElements.shortenToLength(R);break}if(g._isSpecialElement(w,B))break}}function Mf(g,_){switch(_.tagID){case J.A:case J.B:case J.I:case J.S:case J.U:case J.EM:case J.TT:case J.BIG:case J.CODE:case J.FONT:case J.NOBR:case J.SMALL:case J.STRIKE:case J.STRONG:{Yb(g,_);break}case J.P:{aU(g);break}case J.DL:case J.UL:case J.OL:case J.DIR:case J.DIV:case J.NAV:case J.PRE:case J.MAIN:case J.MENU:case J.ASIDE:case J.BUTTON:case J.CENTER:case J.FIGURE:case J.FOOTER:case J.HEADER:case J.HGROUP:case J.DIALOG:case J.ADDRESS:case J.ARTICLE:case J.DETAILS:case J.SEARCH:case J.SECTION:case J.SUMMARY:case J.LISTING:case J.FIELDSET:case J.BLOCKQUOTE:case J.FIGCAPTION:{iU(g,_);break}case J.LI:{uU(g);break}case J.DD:case J.DT:{cU(g,_);break}case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:{lU(g);break}case J.BR:{pU(g);break}case J.BODY:{rU(g,_);break}case J.HTML:{oU(g,_);break}case J.FORM:{sU(g);break}case J.APPLET:case J.OBJECT:case J.MARQUEE:{dU(g,_);break}case J.TEMPLATE:{Ks(g,_);break}default:KI(g,_)}}function JI(g,_){if(g.tmplInsertionModeStack.length>0)oC(g,_);else Wb(g,_)}function mU(g,_){var E;if(_.tagID===J.SCRIPT)(E=g.scriptHandler)===null||E===void 0||E.call(g,g.openElements.current);g.openElements.pop(),g.insertionMode=g.originalInsertionMode}function fU(g,_){g._err(_,Le.eofInElementThatCanContainOnlyText),g.openElements.pop(),g.insertionMode=g.originalInsertionMode,g.onEof(_)}function Zb(g,_){if(g.openElements.currentTagId!==void 0&&ZI.has(g.openElements.currentTagId))switch(g.pendingCharacterTokens.length=0,g.hasNonWhitespacePendingCharacterToken=!1,g.originalInsertionMode=g.insertionMode,g.insertionMode=Te.IN_TABLE_TEXT,_.type){case an.CHARACTER:{QI(g,_);break}case an.WHITESPACE_CHARACTER:{XI(g,_);break}}else Od(g,_)}function hU(g,_){g.openElements.clearBackToTableContext(),g.activeFormattingElements.insertMarker(),g._insertElement(_,Qe.HTML),g.insertionMode=Te.IN_CAPTION}function gU(g,_){g.openElements.clearBackToTableContext(),g._insertElement(_,Qe.HTML),g.insertionMode=Te.IN_COLUMN_GROUP}function bU(g,_){g.openElements.clearBackToTableContext(),g._insertFakeElement(ze.COLGROUP,J.COLGROUP),g.insertionMode=Te.IN_COLUMN_GROUP,Kb(g,_)}function SU(g,_){g.openElements.clearBackToTableContext(),g._insertElement(_,Qe.HTML),g.insertionMode=Te.IN_TABLE_BODY}function _U(g,_){g.openElements.clearBackToTableContext(),g._insertFakeElement(ze.TBODY,J.TBODY),g.insertionMode=Te.IN_TABLE_BODY,Lf(g,_)}function EU(g,_){if(g.openElements.hasInTableScope(J.TABLE))g.openElements.popUntilTagNamePopped(J.TABLE),g._resetInsertionMode(),g._processStartTag(_)}function TU(g,_){if(WI(_))g._appendElement(_,Qe.HTML);else Od(g,_);_.ackSelfClosing=!0}function yU(g,_){if(!g.formElement&&g.openElements.tmplCount===0)g._insertElement(_,Qe.HTML),g.formElement=g.openElements.current,g.openElements.pop()}function ru(g,_){switch(_.tagID){case J.TD:case J.TH:case J.TR:{_U(g,_);break}case J.STYLE:case J.SCRIPT:case J.TEMPLATE:{$o(g,_);break}case J.COL:{bU(g,_);break}case J.FORM:{yU(g,_);break}case J.TABLE:{EU(g,_);break}case J.TBODY:case J.TFOOT:case J.THEAD:{SU(g,_);break}case J.INPUT:{TU(g,_);break}case J.CAPTION:{hU(g,_);break}case J.COLGROUP:{gU(g,_);break}default:Od(g,_)}}function Nd(g,_){switch(_.tagID){case J.TABLE:{if(g.openElements.hasInTableScope(J.TABLE))g.openElements.popUntilTagNamePopped(J.TABLE),g._resetInsertionMode();break}case J.TEMPLATE:{Ks(g,_);break}case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TBODY:case J.TD:case J.TFOOT:case J.TH:case J.THEAD:case J.TR:break;default:Od(g,_)}}function Od(g,_){let E=g.fosterParentingEnabled;g.fosterParentingEnabled=!0,Of(g,_),g.fosterParentingEnabled=E}function XI(g,_){g.pendingCharacterTokens.push(_)}function QI(g,_){g.pendingCharacterTokens.push(_),g.hasNonWhitespacePendingCharacterToken=!0}function Id(g,_){let E=0;if(g.hasNonWhitespacePendingCharacterToken)for(;E<g.pendingCharacterTokens.length;E++)Od(g,g.pendingCharacterTokens[E]);else for(;E<g.pendingCharacterTokens.length;E++)g._insertCharacters(g.pendingCharacterTokens[E]);g.insertionMode=g.originalInsertionMode,g._processToken(_)}var eC=new Set([J.CAPTION,J.COL,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]);function vU(g,_){let E=_.tagID;if(eC.has(E)){if(g.openElements.hasInTableScope(J.CAPTION))g.openElements.generateImpliedEndTags(),g.openElements.popUntilTagNamePopped(J.CAPTION),g.activeFormattingElements.clearToLastMarker(),g.insertionMode=Te.IN_TABLE,ru(g,_)}else Tr(g,_)}function xU(g,_){let E=_.tagID;switch(E){case J.CAPTION:case J.TABLE:{if(g.openElements.hasInTableScope(J.CAPTION)){if(g.openElements.generateImpliedEndTags(),g.openElements.popUntilTagNamePopped(J.CAPTION),g.activeFormattingElements.clearToLastMarker(),g.insertionMode=Te.IN_TABLE,E===J.TABLE)Nd(g,_)}break}case J.BODY:case J.COL:case J.COLGROUP:case J.HTML:case J.TBODY:case J.TD:case J.TFOOT:case J.TH:case J.THEAD:case J.TR:break;default:Mf(g,_)}}function Kb(g,_){switch(_.tagID){case J.HTML:{Tr(g,_);break}case J.COL:{g._appendElement(_,Qe.HTML),_.ackSelfClosing=!0;break}case J.TEMPLATE:{$o(g,_);break}default:zf(g,_)}}function RU(g,_){switch(_.tagID){case J.COLGROUP:{if(g.openElements.currentTagId===J.COLGROUP)g.openElements.pop(),g.insertionMode=Te.IN_TABLE;break}case J.TEMPLATE:{Ks(g,_);break}case J.COL:break;default:zf(g,_)}}function zf(g,_){if(g.openElements.currentTagId===J.COLGROUP)g.openElements.pop(),g.insertionMode=Te.IN_TABLE,g._processToken(_)}function Lf(g,_){switch(_.tagID){case J.TR:{g.openElements.clearBackToTableBodyContext(),g._insertElement(_,Qe.HTML),g.insertionMode=Te.IN_ROW;break}case J.TH:case J.TD:{g.openElements.clearBackToTableBodyContext(),g._insertFakeElement(ze.TR,J.TR),g.insertionMode=Te.IN_ROW,Df(g,_);break}case J.CAPTION:case J.COL:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:{if(g.openElements.hasTableBodyContextInTableScope())g.openElements.clearBackToTableBodyContext(),g.openElements.pop(),g.insertionMode=Te.IN_TABLE,ru(g,_);break}default:ru(g,_)}}function Gb(g,_){let E=_.tagID;switch(_.tagID){case J.TBODY:case J.TFOOT:case J.THEAD:{if(g.openElements.hasInTableScope(E))g.openElements.clearBackToTableBodyContext(),g.openElements.pop(),g.insertionMode=Te.IN_TABLE;break}case J.TABLE:{if(g.openElements.hasTableBodyContextInTableScope())g.openElements.clearBackToTableBodyContext(),g.openElements.pop(),g.insertionMode=Te.IN_TABLE,Nd(g,_);break}case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TD:case J.TH:case J.TR:break;default:Nd(g,_)}}function Df(g,_){switch(_.tagID){case J.TH:case J.TD:{g.openElements.clearBackToTableRowContext(),g._insertElement(_,Qe.HTML),g.insertionMode=Te.IN_CELL,g.activeFormattingElements.insertMarker();break}case J.CAPTION:case J.COL:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:case J.TR:{if(g.openElements.hasInTableScope(J.TR))g.openElements.clearBackToTableRowContext(),g.openElements.pop(),g.insertionMode=Te.IN_TABLE_BODY,Lf(g,_);break}default:ru(g,_)}}function tC(g,_){switch(_.tagID){case J.TR:{if(g.openElements.hasInTableScope(J.TR))g.openElements.clearBackToTableRowContext(),g.openElements.pop(),g.insertionMode=Te.IN_TABLE_BODY;break}case J.TABLE:{if(g.openElements.hasInTableScope(J.TR))g.openElements.clearBackToTableRowContext(),g.openElements.pop(),g.insertionMode=Te.IN_TABLE_BODY,Gb(g,_);break}case J.TBODY:case J.TFOOT:case J.THEAD:{if(g.openElements.hasInTableScope(_.tagID)||g.openElements.hasInTableScope(J.TR))g.openElements.clearBackToTableRowContext(),g.openElements.pop(),g.insertionMode=Te.IN_TABLE_BODY,Gb(g,_);break}case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TD:case J.TH:break;default:Nd(g,_)}}function kU(g,_){let E=_.tagID;if(eC.has(E)){if(g.openElements.hasInTableScope(J.TD)||g.openElements.hasInTableScope(J.TH))g._closeTableCell(),Df(g,_)}else Tr(g,_)}function IU(g,_){let E=_.tagID;switch(E){case J.TD:case J.TH:{if(g.openElements.hasInTableScope(E))g.openElements.generateImpliedEndTags(),g.openElements.popUntilTagNamePopped(E),g.activeFormattingElements.clearToLastMarker(),g.insertionMode=Te.IN_ROW;break}case J.TABLE:case J.TBODY:case J.TFOOT:case J.THEAD:case J.TR:{if(g.openElements.hasInTableScope(E))g._closeTableCell(),tC(g,_);break}case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:break;default:Mf(g,_)}}function nC(g,_){switch(_.tagID){case J.HTML:{Tr(g,_);break}case J.OPTION:{if(g.openElements.currentTagId===J.OPTION)g.openElements.pop();g._insertElement(_,Qe.HTML);break}case J.OPTGROUP:{if(g.openElements.currentTagId===J.OPTION)g.openElements.pop();if(g.openElements.currentTagId===J.OPTGROUP)g.openElements.pop();g._insertElement(_,Qe.HTML);break}case J.HR:{if(g.openElements.currentTagId===J.OPTION)g.openElements.pop();if(g.openElements.currentTagId===J.OPTGROUP)g.openElements.pop();g._appendElement(_,Qe.HTML),_.ackSelfClosing=!0;break}case J.INPUT:case J.KEYGEN:case J.TEXTAREA:case J.SELECT:{if(g.openElements.hasInSelectScope(J.SELECT)){if(g.openElements.popUntilTagNamePopped(J.SELECT),g._resetInsertionMode(),_.tagID!==J.SELECT)g._processStartTag(_)}break}case J.SCRIPT:case J.TEMPLATE:{$o(g,_);break}default:}}function rC(g,_){switch(_.tagID){case J.OPTGROUP:{if(g.openElements.stackTop>0&&g.openElements.currentTagId===J.OPTION&&g.openElements.tagIDs[g.openElements.stackTop-1]===J.OPTGROUP)g.openElements.pop();if(g.openElements.currentTagId===J.OPTGROUP)g.openElements.pop();break}case J.OPTION:{if(g.openElements.currentTagId===J.OPTION)g.openElements.pop();break}case J.SELECT:{if(g.openElements.hasInSelectScope(J.SELECT))g.openElements.popUntilTagNamePopped(J.SELECT),g._resetInsertionMode();break}case J.TEMPLATE:{Ks(g,_);break}default:}}function CU(g,_){let E=_.tagID;if(E===J.CAPTION||E===J.TABLE||E===J.TBODY||E===J.TFOOT||E===J.THEAD||E===J.TR||E===J.TD||E===J.TH)g.openElements.popUntilTagNamePopped(J.SELECT),g._resetInsertionMode(),g._processStartTag(_);else nC(g,_)}function wU(g,_){let E=_.tagID;if(E===J.CAPTION||E===J.TABLE||E===J.TBODY||E===J.TFOOT||E===J.THEAD||E===J.TR||E===J.TD||E===J.TH){if(g.openElements.hasInTableScope(E))g.openElements.popUntilTagNamePopped(J.SELECT),g._resetInsertionMode(),g.onEndTag(_)}else rC(g,_)}function AU(g,_){switch(_.tagID){case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:case J.NOFRAMES:case J.SCRIPT:case J.STYLE:case J.TEMPLATE:case J.TITLE:{$o(g,_);break}case J.CAPTION:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:{g.tmplInsertionModeStack[0]=Te.IN_TABLE,g.insertionMode=Te.IN_TABLE,ru(g,_);break}case J.COL:{g.tmplInsertionModeStack[0]=Te.IN_COLUMN_GROUP,g.insertionMode=Te.IN_COLUMN_GROUP,Kb(g,_);break}case J.TR:{g.tmplInsertionModeStack[0]=Te.IN_TABLE_BODY,g.insertionMode=Te.IN_TABLE_BODY,Lf(g,_);break}case J.TD:case J.TH:{g.tmplInsertionModeStack[0]=Te.IN_ROW,g.insertionMode=Te.IN_ROW,Df(g,_);break}default:g.tmplInsertionModeStack[0]=Te.IN_BODY,g.insertionMode=Te.IN_BODY,Tr(g,_)}}function PU(g,_){if(_.tagID===J.TEMPLATE)Ks(g,_)}function oC(g,_){if(g.openElements.tmplCount>0)g.openElements.popUntilTagNamePopped(J.TEMPLATE),g.activeFormattingElements.clearToLastMarker(),g.tmplInsertionModeStack.shift(),g._resetInsertionMode(),g.onEof(_);else Wb(g,_)}function zU(g,_){if(_.tagID===J.HTML)Tr(g,_);else Nf(g,_)}function iC(g,_){var E;if(_.tagID===J.HTML){if(!g.fragmentContext)g.insertionMode=Te.AFTER_AFTER_BODY;if(g.options.sourceCodeLocationInfo&&g.openElements.tagIDs[0]===J.HTML){g._setEndLocation(g.openElements.items[0],_);let T=g.openElements.items[1];if(T&&!((E=g.treeAdapter.getNodeSourceCodeLocation(T))===null||E===void 0?void 0:E.endTag))g._setEndLocation(T,_)}}else Nf(g,_)}function Nf(g,_){g.insertionMode=Te.IN_BODY,Of(g,_)}function NU(g,_){switch(_.tagID){case J.HTML:{Tr(g,_);break}case J.FRAMESET:{g._insertElement(_,Qe.HTML);break}case J.FRAME:{g._appendElement(_,Qe.HTML),_.ackSelfClosing=!0;break}case J.NOFRAMES:{$o(g,_);break}default:}}function OU(g,_){if(_.tagID===J.FRAMESET&&!g.openElements.isRootHtmlElementCurrent()){if(g.openElements.pop(),!g.fragmentContext&&g.openElements.currentTagId!==J.FRAMESET)g.insertionMode=Te.AFTER_FRAMESET}}function MU(g,_){switch(_.tagID){case J.HTML:{Tr(g,_);break}case J.NOFRAMES:{$o(g,_);break}default:}}function LU(g,_){if(_.tagID===J.HTML)g.insertionMode=Te.AFTER_AFTER_FRAMESET}function DU(g,_){if(_.tagID===J.HTML)Tr(g,_);else Pf(g,_)}function Pf(g,_){g.insertionMode=Te.IN_BODY,Of(g,_)}function $U(g,_){switch(_.tagID){case J.HTML:{Tr(g,_);break}case J.NOFRAMES:{$o(g,_);break}default:}}function UU(g,_){_.chars=In,g._insertCharacters(_)}function FU(g,_){g._insertCharacters(_),g.framesetOk=!1}function sC(g){while(g.treeAdapter.getNamespaceURI(g.openElements.current)!==Qe.HTML&&g.openElements.currentTagId!==void 0&&!g._isIntegrationPoint(g.openElements.currentTagId,g.openElements.current))g.openElements.pop()}function BU(g,_){if($I(_))sC(g),g._startTagOutsideForeignContent(_);else{let E=g._getAdjustedCurrentElement(),T=g.treeAdapter.getNamespaceURI(E);if(T===Qe.MATHML)qb(_);else if(T===Qe.SVG)UI(_),jb(_);if(Af(_),_.selfClosing)g._appendElement(_,T);else g._insertElement(_,T);_.ackSelfClosing=!0}}function HU(g,_){if(_.tagID===J.P||_.tagID===J.BR){sC(g),g._endTagOutsideForeignContent(_);return}for(let E=g.openElements.stackTop;E>0;E--){let T=g.openElements.items[E];if(g.treeAdapter.getNamespaceURI(T)===Qe.HTML){g._endTagOutsideForeignContent(_);break}let R=g.treeAdapter.getTagName(T);if(R.toLowerCase()===_.tagName){_.tagName=R,g.openElements.shortenToLength(E);break}}}var Hoe=new Set([ze.AREA,ze.BASE,ze.BASEFONT,ze.BGSOUND,ze.BR,ze.COL,ze.EMBED,ze.FRAME,ze.HR,ze.IMG,ze.INPUT,ze.KEYGEN,ze.LINK,ze.META,ze.PARAM,ze.SOURCE,ze.TRACK,ze.WBR]);var qU=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,jU=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),aC={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function $f(g,_){let E=eF(g),T=yf("type",{handlers:{root:ZU,element:VU,text:GU,comment:cC,doctype:YU,raw:KU},unknown:JU}),R={parser:E?new ou(aC):ou.getFragmentParser(void 0,aC),handle(Z){T(Z,R)},stitches:!1,options:_||{}};T(g,R),iu(R,Fr());let w=E?R.parser.document:R.parser.getFragment(),B=zb(w,{file:R.options.file});if(R.stitches)Ti(B,"comment",function(Z,K,X){let ee=Z;if(ee.value.stitch&&X&&K!==void 0){let re=X.children;return re[K]=ee.value.stitch,K}});if(B.type==="root"&&B.children.length===1&&B.children[0].type===g.type)return B.children[0];return B}function uC(g,_){let E=-1;if(g)while(++E<g.length)_.handle(g[E])}function ZU(g,_){uC(g.children,_)}function VU(g,_){XU(g,_),uC(g.children,_),QU(g,_)}function GU(g,_){if(_.parser.tokenizer.state>4)_.parser.tokenizer.state=0;let E={type:an.CHARACTER,chars:g.value,location:Md(g)};iu(_,Fr(g)),_.parser.currentToken=E,_.parser._processToken(_.parser.currentToken)}function YU(g,_){let E={type:an.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Md(g)};iu(_,Fr(g)),_.parser.currentToken=E,_.parser._processToken(_.parser.currentToken)}function WU(g,_){_.stitches=!0;let E=tF(g);if("children"in g&&"children"in E){let T=$f({type:"root",children:g.children},_.options);E.children=T.children}cC({type:"comment",value:{stitch:E}},_)}function cC(g,_){let E=g.value,T={type:an.COMMENT,data:E,location:Md(g)};iu(_,Fr(g)),_.parser.currentToken=T,_.parser._processToken(_.parser.currentToken)}function KU(g,_){if(_.parser.tokenizer.preprocessor.html="",_.parser.tokenizer.preprocessor.pos=-1,_.parser.tokenizer.preprocessor.lastGapPos=-2,_.parser.tokenizer.preprocessor.gapStack=[],_.parser.tokenizer.preprocessor.skipNextNewLine=!1,_.parser.tokenizer.preprocessor.lastChunkWritten=!1,_.parser.tokenizer.preprocessor.endOfChunkHit=!1,_.parser.tokenizer.preprocessor.isEol=!1,lC(_,Fr(g)),_.parser.tokenizer.write(_.options.tagfilter?g.value.replace(qU,"<$1$2"):g.value,!1),_.parser.tokenizer._runParsingLoop(),_.parser.tokenizer.state===72||_.parser.tokenizer.state===78){_.parser.tokenizer.preprocessor.lastChunkWritten=!0;let E=_.parser.tokenizer._consume();_.parser.tokenizer._callState(E)}}function JU(g,_){let E=g;if(_.options.passThrough&&_.options.passThrough.includes(E.type))WU(E,_);else{let T="";if(jU.has(E.type))T=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax";throw Error("Cannot compile `"+E.type+"` node"+T)}}function iu(g,_){lC(g,_);let E=g.parser.tokenizer.currentCharacterToken;if(E&&E.location)E.location.endLine=g.parser.tokenizer.preprocessor.line,E.location.endCol=g.parser.tokenizer.preprocessor.col+1,E.location.endOffset=g.parser.tokenizer.preprocessor.offset+1,g.parser.currentToken=E,g.parser._processToken(g.parser.currentToken);g.parser.tokenizer.paused=!1,g.parser.tokenizer.inLoop=!1,g.parser.tokenizer.active=!1,g.parser.tokenizer.returnState=zn.DATA,g.parser.tokenizer.charRefCode=-1,g.parser.tokenizer.consumedAfterSnapshot=-1,g.parser.tokenizer.currentLocation=null,g.parser.tokenizer.currentCharacterToken=null,g.parser.tokenizer.currentToken=null,g.parser.tokenizer.currentAttr={name:"",value:""}}function lC(g,_){if(_&&_.offset!==void 0){let E={startLine:_.line,startCol:_.column,startOffset:_.offset,endLine:-1,endCol:-1,endOffset:-1};g.parser.tokenizer.preprocessor.lineStartPos=-_.column+1,g.parser.tokenizer.preprocessor.droppedBufferSize=_.offset,g.parser.tokenizer.preprocessor.line=_.line,g.parser.tokenizer.currentLocation=E}}function XU(g,_){let E=g.tagName.toLowerCase();if(_.parser.tokenizer.state===zn.PLAINTEXT)return;iu(_,Fr(g));let T=_.parser.openElements.current,R="namespaceURI"in T?T.namespaceURI:ti.html;if(R===ti.html&&E==="svg")R=ti.svg;let w=Ob({...g,children:[]},{space:R===ti.svg?"svg":"html"}),B={type:an.START_TAG,tagName:E,tagID:vi(E),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in w?w.attrs:[],location:Md(g)};_.parser.currentToken=B,_.parser._processToken(_.parser.currentToken),_.parser.tokenizer.lastStartTagName=E}function QU(g,_){let E=g.tagName.toLowerCase();if(!_.parser.tokenizer.inForeignNode&&gI.includes(E))return;if(_.parser.tokenizer.state===zn.PLAINTEXT)return;iu(_,Fs(g));let T={type:an.END_TAG,tagName:E,tagID:vi(E),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Md(g)};if(_.parser.currentToken=T,_.parser._processToken(_.parser.currentToken),E===_.parser.tokenizer.lastStartTagName&&(_.parser.tokenizer.state===zn.RCDATA||_.parser.tokenizer.state===zn.RAWTEXT||_.parser.tokenizer.state===zn.SCRIPT_DATA))_.parser.tokenizer.state=zn.DATA}function eF(g){let _=g.type==="root"?g.children[0]:g;return Boolean(_&&(_.type==="doctype"||_.type==="element"&&_.tagName.toLowerCase()==="html"))}function Md(g){let _=Fr(g)||{line:void 0,column:void 0,offset:void 0},E=Fs(g)||{line:void 0,column:void 0,offset:void 0};return{startLine:_.line,startCol:_.column,startOffset:_.offset,endLine:E.line,endCol:E.column,endOffset:E.offset}}function tF(g){return"children"in g?Ei({...g,children:[]}):Ei(g)}function Uf(g){return function(_,E){return $f(_,{...g,file:E})}}function Jb(g,_){let E=String(g);if(typeof _!=="string")throw TypeError("Expected character");let T=0,R=E.indexOf(_);while(R!==-1)T++,R=E.indexOf(_,R+_.length);return T}function Xb(g){if(typeof g!=="string")throw TypeError("Expected a string");return g.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Qb(g,_,E){let R=es((E||{}).ignore||[]),w=nF(_),B=-1;while(++B<w.length)Td(g,"text",Z);function Z(X,ee){let re=-1,ie;while(++re<ee.length){let se=ee[re],ae=ie?ie.children:void 0;if(R(se,ae?ae.indexOf(se):void 0,ie))return;ie=se}if(ie)return K(X,ee)}function K(X,ee){let re=ee[ee.length-1],ie=w[B][0],se=w[B][1],ae=0,xe=re.children.indexOf(X),Ee=!1,Ae=[];ie.lastIndex=0;let Re=ie.exec(X.value);while(Re){let Ve=Re.index,Ge={index:Re.index,input:Re.input,stack:[...ee,X]},ke=se(...Re,Ge);if(typeof ke==="string")ke=ke.length>0?{type:"text",value:ke}:void 0;if(ke===!1)ie.lastIndex=Ve+1;else{if(ae!==Ve)Ae.push({type:"text",value:X.value.slice(ae,Ve)});if(Array.isArray(ke))Ae.push(...ke);else if(ke)Ae.push(ke);ae=Ve+Re[0].length,Ee=!0}if(!ie.global)break;Re=ie.exec(X.value)}if(Ee){if(ae<X.value.length)Ae.push({type:"text",value:X.value.slice(ae)});re.children.splice(xe,1,...Ae)}else Ae=[X];return xe+Ae.length}}function nF(g){let _=[];if(!Array.isArray(g))throw TypeError("Expected find and replace tuple or list of tuples");let E=!g[0]||Array.isArray(g[0])?g:[g],T=-1;while(++T<E.length){let R=E[T];_.push([rF(R[0]),oF(R[1])])}return _}function rF(g){return typeof g==="string"?new RegExp(Xb(g),"g"):g}function oF(g){return typeof g==="function"?g:function(){return g}}var eS="phrasing",tS=["autolink","link","image","label"];function rS(){return{transforms:[lF],enter:{literalAutolink:iF,literalAutolinkEmail:nS,literalAutolinkHttp:nS,literalAutolinkWww:nS},exit:{literalAutolink:cF,literalAutolinkEmail:uF,literalAutolinkHttp:sF,literalAutolinkWww:aF}}}function oS(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:eS,notInConstruct:tS},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:eS,notInConstruct:tS},{character:":",before:"[ps]",after:"\\/",inConstruct:eS,notInConstruct:tS}]}}function iF(g){this.enter({type:"link",title:null,url:"",children:[]},g)}function nS(g){this.config.enter.autolinkProtocol.call(this,g)}function sF(g){this.config.exit.autolinkProtocol.call(this,g)}function aF(g){this.config.exit.data.call(this,g);let _=this.stack[this.stack.length-1];gn(_.type==="link"),_.url="http://"+this.sliceSerialize(g)}function uF(g){this.config.exit.autolinkEmail.call(this,g)}function cF(g){this.exit(g)}function lF(g){Qb(g,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,dF],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,pF]],{ignore:["link","linkReference"]})}function dF(g,_,E,T,R){let w="";if(!dC(R))return!1;if(/^w/i.test(_))E=_+E,_="",w="http://";if(!mF(E))return!1;let B=fF(E+T);if(!B[0])return!1;let Z={type:"link",title:null,url:w+_+B[0],children:[{type:"text",value:_+B[0]}]};if(B[1])return[Z,{type:"text",value:B[1]}];return Z}function pF(g,_,E,T){if(!dC(T,!0)||/[-\d_]$/.test(E))return!1;return{type:"link",title:null,url:"mailto:"+_+"@"+E,children:[{type:"text",value:_+"@"+E}]}}function mF(g){let _=g.split(".");if(_.length<2||_[_.length-1]&&(/_/.test(_[_.length-1])||!/[a-zA-Z\d]/.test(_[_.length-1]))||_[_.length-2]&&(/_/.test(_[_.length-2])||!/[a-zA-Z\d]/.test(_[_.length-2])))return!1;return!0}function fF(g){let _=/[!"&'),.:;<>?\]}]+$/.exec(g);if(!_)return[g,void 0];g=g.slice(0,_.index);let E=_[0],T=E.indexOf(")"),R=Jb(g,"("),w=Jb(g,")");while(T!==-1&&R>w)g+=E.slice(0,T+1),E=E.slice(T+1),T=E.indexOf(")"),w++;return[g,E]}function dC(g,_){let E=g.input.charCodeAt(g.index-1);return(g.index===0||Qo(E)||qs(E))&&(!_||E!==47)}pC.peek=vF;function hF(){this.buffer()}function gF(g){this.enter({type:"footnoteReference",identifier:"",label:""},g)}function bF(){this.buffer()}function SF(g){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},g)}function _F(g){let _=this.resume(),E=this.stack[this.stack.length-1];gn(E.type==="footnoteReference"),E.identifier=br(this.sliceSerialize(g)).toLowerCase(),E.label=_}function EF(g){this.exit(g)}function TF(g){let _=this.resume(),E=this.stack[this.stack.length-1];gn(E.type==="footnoteDefinition"),E.identifier=br(this.sliceSerialize(g)).toLowerCase(),E.label=_}function yF(g){this.exit(g)}function vF(){return"["}function pC(g,_,E,T){let R=E.createTracker(T),w=R.move("[^"),B=E.enter("footnoteReference"),Z=E.enter("reference");return w+=R.move(E.safe(E.associationId(g),{after:"]",before:w})),Z(),B(),w+=R.move("]"),w}function iS(){return{enter:{gfmFootnoteCallString:hF,gfmFootnoteCall:gF,gfmFootnoteDefinitionLabelString:bF,gfmFootnoteDefinition:SF},exit:{gfmFootnoteCallString:_F,gfmFootnoteCall:EF,gfmFootnoteDefinitionLabelString:TF,gfmFootnoteDefinition:yF}}}function sS(g){let _=!1;if(g&&g.firstLineBlank)_=!0;return{handlers:{footnoteDefinition:E,footnoteReference:pC},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function E(T,R,w,B){let Z=w.createTracker(B),K=Z.move("[^"),X=w.enter("footnoteDefinition"),ee=w.enter("label");if(K+=Z.move(w.safe(w.associationId(T),{before:K,after:"]"})),ee(),K+=Z.move("]:"),T.children&&T.children.length>0)Z.shift(4),K+=Z.move((_?`
|
|
117
|
+
`:" ")+w.indentLines(w.containerFlow(T,Z.current()),_?mC:xF));return X(),K}}function xF(g,_,E){return _===0?g:mC(g,_,E)}function mC(g,_,E){return(E?"":" ")+g}var RF=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];cS.attention=CF;cS.peek=wF;function aS(){return{canContainEols:["delete"],enter:{strikethrough:kF},exit:{strikethrough:IF}}}function uS(){return{handlers:{delete:cS},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:RF}]}}function kF(g){this.enter({type:"delete",children:[],position:void 0},g)}function IF(g){this.exit(g)}function cS(g,_,E,T){let R=E.createTracker(T),w=E.stack.includes("strikethrough")?"~":"~~",B=E.enter("strikethrough"),Z=R.move(w);return Z+=E.containerPhrasing(g,{...R.current(),before:Z,after:"~"}),Z+=R.move(w),B(),Z}function CF(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function wF(){return"~"}function AF(g){return g.length}function hC(g,_){let E=_||{},T=(E.align||[]).concat(),R=E.stringLength||AF,w=[],B=[],Z=[],K=[],X=0,ee=-1;while(++ee<g.length){let fe=[],xe=[],Ee=-1;if(g[ee].length>X)X=g[ee].length;while(++Ee<g[ee].length){let Ae=PF(g[ee][Ee]);if(E.alignDelimiters!==!1){let Re=R(Ae);if(xe[Ee]=Re,K[Ee]===void 0||Re>K[Ee])K[Ee]=Re}fe.push(Ae)}B[ee]=fe,Z[ee]=xe}let re=-1;if(typeof T==="object"&&"length"in T)while(++re<X)w[re]=fC(T[re]);else{let fe=fC(T);while(++re<X)w[re]=fe}re=-1;let ie=[],se=[];while(++re<X){let fe=w[re],xe="",Ee="";if(fe===99)xe=":",Ee=":";else if(fe===108)xe=":";else if(fe===114)Ee=":";let Ae=E.alignDelimiters===!1?1:Math.max(1,K[re]-xe.length-Ee.length),Re=xe+"-".repeat(Ae)+Ee;if(E.alignDelimiters!==!1){if(Ae=xe.length+Ae+Ee.length,Ae>K[re])K[re]=Ae;se[re]=Ae}ie[re]=Re}B.splice(1,0,ie),Z.splice(1,0,se),ee=-1;let ae=[];while(++ee<B.length){let fe=B[ee],xe=Z[ee];re=-1;let Ee=[];while(++re<X){let Ae=fe[re]||"",Re="",Ve="";if(E.alignDelimiters!==!1){let Ge=K[re]-(xe[re]||0),ke=w[re];if(ke===114)Re=" ".repeat(Ge);else if(ke===99)if(Ge%2)Re=" ".repeat(Ge/2+0.5),Ve=" ".repeat(Ge/2-0.5);else Re=" ".repeat(Ge/2),Ve=Re;else Ve=" ".repeat(Ge)}if(E.delimiterStart!==!1&&!re)Ee.push("|");if(E.padding!==!1&&!(E.alignDelimiters===!1&&Ae==="")&&(E.delimiterStart!==!1||re))Ee.push(" ");if(E.alignDelimiters!==!1)Ee.push(Re);if(Ee.push(Ae),E.alignDelimiters!==!1)Ee.push(Ve);if(E.padding!==!1)Ee.push(" ");if(E.delimiterEnd!==!1||re!==X-1)Ee.push("|")}ae.push(E.delimiterEnd===!1?Ee.join("").replace(/ +$/,""):Ee.join(""))}return ae.join(`
|
|
118
|
+
`)}function PF(g){return g===null||g===void 0?"":String(g)}function fC(g){let _=typeof g==="string"?g.codePointAt(0):0;return _===67||_===99?99:_===76||_===108?108:_===82||_===114?114:0}function gC(g,_,E,T){let R=E.enter("blockquote"),w=E.createTracker(T);w.move("> "),w.shift(2);let B=E.indentLines(E.containerFlow(g,w.current()),zF);return R(),B}function zF(g,_,E){return">"+(E?"":" ")+g}function SC(g,_){return bC(g,_.inConstruct,!0)&&!bC(g,_.notInConstruct,!1)}function bC(g,_,E){if(typeof _==="string")_=[_];if(!_||_.length===0)return E;let T=-1;while(++T<_.length)if(g.includes(_[T]))return!0;return!1}function lS(g,_,E,T){let R=-1;while(++R<E.unsafe.length){let w=E.unsafe[R];if(w.character===`
|
|
119
|
+
`&&!w.before&&!w.after&&SC(E.stack,w))return/[\t ]/.test(T.before)?"":" "}return"\\\n"}function _C(g,_){let E=String(g),T=E.indexOf(_),R=T,w=0,B=0;if(typeof _!=="string")throw TypeError("Expected substring");while(T!==-1){if(T===R){if(++w>B)B=w}else w=1;R=T+_.length,T=E.indexOf(_,R)}return B}function EC(g,_){return Boolean(_.options.fences===!1&&g.value&&!g.lang&&/[^\n\r ]/.test(g.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(g.value))}function TC(g){let _=g.options.fence||"`";if(_!=="`"&&_!=="~")throw Error("Cannot serialize code with `"+_+"` for `options.fence`, expected `` ` `` or `~`");return _}function yC(g,_,E,T){let R=TC(E),w=g.value||"";if(EC(g,E)){let re=E.enter("codeIndented"),ie=E.indentLines(w,NF);return re(),ie}let B=E.createTracker(T),Z=R.repeat(Math.max(_C(w,R)+1,3)),K=E.enter("codeFenced"),X=R==="`"?"GraveAccent":"Tilde",ee=B.move(Z);if(g.lang){let re=E.enter(`codeFencedLang${X}`);ee+=B.move(E.safe(g.lang,{before:ee,after:" ",encode:["`"],...B.current()})),re()}if(g.lang&&g.meta){let re=E.enter(`codeFencedMeta${X}`);ee+=B.move(" "),ee+=B.move(E.safe(g.meta,{before:ee,after:`
|
|
120
|
+
`,encode:["`"],...B.current()})),re()}if(ee+=B.move(`
|
|
121
|
+
`),w)ee+=B.move(w+`
|
|
122
|
+
`);return ee+=B.move(Z),K(),ee}function NF(g,_,E){return(E?"":" ")+g}function su(g){let _=g.options.quote||'"';if(_!=='"'&&_!=="'")throw Error("Cannot serialize title with `"+_+"` for `options.quote`, expected `\"`, or `'`");return _}function vC(g,_,E,T){let R=su(E),w=R==='"'?"Quote":"Apostrophe",B=E.enter("definition"),Z=E.enter("label"),K=E.createTracker(T),X=K.move("[");if(X+=K.move(E.safe(E.associationId(g),{before:X,after:"]",...K.current()})),X+=K.move("]: "),Z(),!g.url||/[\0- \u007F]/.test(g.url))Z=E.enter("destinationLiteral"),X+=K.move("<"),X+=K.move(E.safe(g.url,{before:X,after:">",...K.current()})),X+=K.move(">");else Z=E.enter("destinationRaw"),X+=K.move(E.safe(g.url,{before:X,after:g.title?" ":`
|
|
123
|
+
`,...K.current()}));if(Z(),g.title)Z=E.enter(`title${w}`),X+=K.move(" "+R),X+=K.move(E.safe(g.title,{before:X,after:R,...K.current()})),X+=K.move(R),Z();return B(),X}function xC(g){let _=g.options.emphasis||"*";if(_!=="*"&&_!=="_")throw Error("Cannot serialize emphasis with `"+_+"` for `options.emphasis`, expected `*`, or `_`");return _}Ff.attention=OF;Ff.peek=MF;function Ff(g,_,E,T){let R=E.enter("phrasing"),w=E.containerPhrasing({type:"root",children:[g]},T);return R(),w}function OF(g,_){return{construct:"emphasis",markers:xC(_)==="*"?["*","_"]:["_","*"],sizes:[1]}}function MF(g,_,E){return E.options.emphasis||"*"}function RC(g){return"&#x"+g.toString(16).toUpperCase()+";"}function kC(g,_){let E=!1;return Ti(g,function(T){if("value"in T&&/\r?\n|\r/.test(T.value)||T.type==="break")return E=!0,Ws}),Boolean((!g.depth||g.depth<3)&&Bs(g)&&(_.options.setext||E))}function IC(g,_,E,T){let R=Math.max(Math.min(6,g.depth||1),1),w=E.createTracker(T);if(kC(g,E)){let re=E.enter("headingSetext"),ie=E.enter("phrasing"),se=E.containerPhrasing(g,{...w.current(),before:`
|
|
124
|
+
`,after:`
|
|
125
|
+
`});return ie(),re(),se+`
|
|
126
|
+
`+(R===1?"=":"-").repeat(se.length-(Math.max(se.lastIndexOf("\r"),se.lastIndexOf(`
|
|
127
|
+
`))+1))}let B="#".repeat(R),Z=E.enter("headingAtx"),K=E.enter("phrasing");w.move(B+" ");let X=E.containerPhrasing(g,{before:"# ",after:`
|
|
128
|
+
`,...w.current()}),ee=X.charCodeAt(0);if(ee===9||ee===32)X=RC(ee)+X.slice(1);if(X=X?B+" "+X:B,E.options.closeAtx)X+=" "+B;return K(),Z(),X}dS.peek=LF;function dS(g){return g.value||""}function LF(){return"<"}pS.peek=DF;function pS(g,_,E,T){let R=su(E),w=R==='"'?"Quote":"Apostrophe",B=E.enter("image"),Z=E.enter("label"),K=E.createTracker(T),X=K.move("![");if(X+=K.move(E.safe(g.alt,{before:X,after:"]",...K.current()})),X+=K.move("]("),Z(),!g.url&&g.title||/[\0- \u007F]/.test(g.url))Z=E.enter("destinationLiteral"),X+=K.move("<"),X+=K.move(E.safe(g.url,{before:X,after:">",...K.current()})),X+=K.move(">");else Z=E.enter("destinationRaw"),X+=K.move(E.safe(g.url,{before:X,after:g.title?" ":")",...K.current()}));if(Z(),g.title)Z=E.enter(`title${w}`),X+=K.move(" "+R),X+=K.move(E.safe(g.title,{before:X,after:R,...K.current()})),X+=K.move(R),Z();return X+=K.move(")"),B(),X}function DF(){return"!"}mS.peek=$F;function mS(g,_,E,T){let R=g.referenceType,w=E.enter("imageReference"),B=E.enter("label"),Z=E.createTracker(T),K=Z.move("!["),X=E.safe(g.alt,{before:K,after:"]",...Z.current()});K+=Z.move(X+"]["),B();let ee=E.stack;E.stack=ee.filter(function(ie){return ie!=="phrasing"}),B=E.enter("reference");let re=E.safe(E.associationId(g),{before:K,after:"]",...Z.current()});if(B(),E.stack=ee,w(),R==="full"||!X||X!==re)K+=Z.move(re+"]");else if(R==="shortcut")K=K.slice(0,-1);else K+=Z.move("]");return K}function $F(){return"!"}fS.peek=UF;function fS(g,_,E){let T=g.value||"",R="`",w=-1;while(new RegExp("(^|[^`])"+R+"([^`]|$)").test(T))R+="`";if(/[^\n\r ]/.test(T)&&(/^[\n\r ]/.test(T)&&/[\n\r ]$/.test(T)||/^`|`$/.test(T)))T=" "+T+" ";while(++w<E.unsafe.length){let B=E.unsafe[w],Z=E.compilePattern(B);if(!B.atBreak)continue;let K;while(K=Z.exec(T)){let X=K.index;if(T.charCodeAt(X)===10&&T.charCodeAt(X-1)===13)X--;T=T.slice(0,X)+" "+T.slice(K.index+1)}}return R+T+R}function UF(){return"`"}function hS(g,_){let E=Bs(g);return Boolean(!_.options.resourceLink&&g.url&&!g.title&&g.children&&g.children.length===1&&g.children[0].type==="text"&&(E===g.url||"mailto:"+E===g.url)&&/^[a-z][+\-.a-z]+:/i.test(g.url)&&!/[\0- <>\u007F]/.test(g.url))}gS.peek=FF;function gS(g,_,E,T){let R=su(E),w=R==='"'?"Quote":"Apostrophe",B=E.createTracker(T);if(hS(g,E)){let ee=E.stack;E.stack=ee.filter(function(se){return se!=="phrasing"});let re=E.enter("autolink"),ie=B.move("<");return ie+=B.move(E.containerPhrasing(g,{before:ie,after:">",...B.current()})),ie+=B.move(">"),re(),E.stack=ee,ie}let Z=E.enter("link"),K=E.enter("label"),X=B.move("[");if(X+=B.move(E.containerPhrasing(g,{before:X,after:"](",...B.current()})),X+=B.move("]("),K(),!g.url&&g.title||/[\0- \u007F]/.test(g.url))K=E.enter("destinationLiteral"),X+=B.move("<"),X+=B.move(E.safe(g.url,{before:X,after:">",...B.current()})),X+=B.move(">");else K=E.enter("destinationRaw"),X+=B.move(E.safe(g.url,{before:X,after:g.title?" ":")",...B.current()}));if(K(),g.title)K=E.enter(`title${w}`),X+=B.move(" "+R),X+=B.move(E.safe(g.title,{before:X,after:R,...B.current()})),X+=B.move(R),K();return X+=B.move(")"),Z(),X}function FF(g,_,E){return hS(g,E)?"<":"["}bS.peek=BF;function bS(g,_,E,T){let R=g.referenceType,w=E.enter("linkReference"),B=E.enter("label"),Z=E.createTracker(T),K=Z.move("["),X=E.containerPhrasing(g,{before:K,after:"]",...Z.current()});K+=Z.move(X+"]["),B();let ee=E.stack;E.stack=ee.filter(function(ie){return ie!=="phrasing"}),B=E.enter("reference");let re=E.safe(E.associationId(g),{before:K,after:"]",...Z.current()});if(B(),E.stack=ee,w(),R==="full"||!X||X!==re)K+=Z.move(re+"]");else if(R==="shortcut")K=K.slice(0,-1);else K+=Z.move("]");return K}function BF(){return"["}function au(g){let _=g.options.bullet||"*";if(_!=="*"&&_!=="+"&&_!=="-")throw Error("Cannot serialize items with `"+_+"` for `options.bullet`, expected `*`, `+`, or `-`");return _}function CC(g){let _=au(g),E=g.options.bulletOther;if(!E)return _==="*"?"-":"*";if(E!=="*"&&E!=="+"&&E!=="-")throw Error("Cannot serialize items with `"+E+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(E===_)throw Error("Expected `bullet` (`"+_+"`) and `bulletOther` (`"+E+"`) to be different");return E}function wC(g){let _=g.options.bulletOrdered||".";if(_!=="."&&_!==")")throw Error("Cannot serialize items with `"+_+"` for `options.bulletOrdered`, expected `.` or `)`");return _}function Bf(g){let _=g.options.rule||"*";if(_!=="*"&&_!=="-"&&_!=="_")throw Error("Cannot serialize rules with `"+_+"` for `options.rule`, expected `*`, `-`, or `_`");return _}function AC(g,_,E,T){let R=E.enter("list"),w=E.bulletCurrent,B=g.ordered?wC(E):au(E),Z=g.ordered?B==="."?")":".":CC(E),K=_&&E.bulletLastUsed?B===E.bulletLastUsed:!1;if(!g.ordered){let ee=g.children?g.children[0]:void 0;if((B==="*"||B==="-")&&ee&&(!ee.children||!ee.children[0])&&E.stack[E.stack.length-1]==="list"&&E.stack[E.stack.length-2]==="listItem"&&E.stack[E.stack.length-3]==="list"&&E.stack[E.stack.length-4]==="listItem"&&E.indexStack[E.indexStack.length-1]===0&&E.indexStack[E.indexStack.length-2]===0&&E.indexStack[E.indexStack.length-3]===0)K=!0;if(Bf(E)===B&&ee){let re=-1;while(++re<g.children.length){let ie=g.children[re];if(ie&&ie.type==="listItem"&&ie.children&&ie.children[0]&&ie.children[0].type==="thematicBreak"){K=!0;break}}}}if(K)B=Z;E.bulletCurrent=B;let X=E.containerFlow(g,T);return E.bulletLastUsed=B,E.bulletCurrent=w,R(),X}function PC(g){let _=g.options.listItemIndent||"one";if(_!=="tab"&&_!=="one"&&_!=="mixed")throw Error("Cannot serialize items with `"+_+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return _}function zC(g,_,E,T){let R=PC(E),w=E.bulletCurrent||au(E);if(_&&_.type==="list"&&_.ordered)w=(typeof _.start==="number"&&_.start>-1?_.start:1)+(E.options.incrementListMarker===!1?0:_.children.indexOf(g))+w;let B=w.length+1;if(R==="tab"||R==="mixed"&&(_&&_.type==="list"&&_.spread||g.spread))B=Math.ceil(B/4)*4;let Z=E.createTracker(T);Z.move(w+" ".repeat(B-w.length)),Z.shift(B);let K=E.enter("listItem"),X=E.indentLines(E.containerFlow(g,Z.current()),ee);return K(),X;function ee(re,ie,se){if(ie)return(se?"":" ".repeat(B))+re;return(se?w:w+" ".repeat(B-w.length))+re}}function NC(g,_,E,T){let R=E.enter("paragraph"),w=E.enter("phrasing"),B=E.containerPhrasing(g,T);return w(),R(),B}var SS=es(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function OC(g,_,E,T){if(!g.children.some(function(Z){return SS(Z)}))return E.containerFlow(g,T);let w=E.enter("phrasing"),B=E.containerPhrasing(g,T);return w(),B}function MC(g){let _=g.options.strong||"*";if(_!=="*"&&_!=="_")throw Error("Cannot serialize strong with `"+_+"` for `options.strong`, expected `*`, or `_`");return _}Hf.attention=HF;Hf.peek=qF;function Hf(g,_,E,T){let R=E.enter("phrasing"),w=E.containerPhrasing({type:"root",children:[g]},T);return R(),w}function HF(g,_){return{construct:"strong",markers:MC(_)==="*"?["*","_"]:["_","*"],sizes:[2]}}function qF(g,_,E){return E.options.strong||"*"}function LC(g,_,E,T){let R=_?_.children:[],w=R.indexOf(g);return E.safe(g.value,{...T,afterNode:R[w+1],beforeNode:R[w-1]})}function DC(g){let _=g.options.ruleRepetition||3;if(_<3)throw Error("Cannot serialize rules with repetition `"+_+"` for `options.ruleRepetition`, expected `3` or more");return _}function $C(g,_,E){let T=(Bf(E)+(E.options.ruleSpaces?" ":"")).repeat(DC(E));return E.options.ruleSpaces?T.slice(0,-1):T}var Ld={blockquote:gC,break:lS,code:yC,definition:vC,emphasis:Ff,hardBreak:lS,heading:IC,html:dS,image:pS,imageReference:mS,inlineCode:fS,link:gS,linkReference:bS,list:AC,listItem:zC,paragraph:NC,root:OC,strong:Hf,text:LC,thematicBreak:$C};function ES(){return{enter:{table:jF,tableData:UC,tableHeader:UC,tableRow:VF},exit:{codeText:GF,table:ZF,tableData:_S,tableHeader:_S,tableRow:_S}}}function jF(g){let _=g._align;gn(_,"expected `_align` on table"),this.enter({type:"table",align:_.map(function(E){return E==="none"?null:E}),children:[]},g),this.data.inTable=!0}function ZF(g){this.exit(g),this.data.inTable=void 0}function VF(g){this.enter({type:"tableRow",children:[]},g)}function _S(g){this.exit(g)}function UC(g){this.enter({type:"tableCell",children:[]},g)}function GF(g){let _=this.resume();if(this.data.inTable)_=_.replace(/\\([\\|])/g,YF);let E=this.stack[this.stack.length-1];gn(E.type==="inlineCode"),E.value=_,this.exit(g)}function YF(g,_){return _==="|"?_:g}function TS(g){let _=g||{},{tableCellPadding:E,tablePipeAlign:T,stringLength:R}=_,w=E?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
129
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:ie,table:B,tableCell:K,tableRow:Z}};function B(se,ae,fe,xe){return X(ee(se,fe,xe),se.align)}function Z(se,ae,fe,xe){let Ee=re(se,fe,xe),Ae=X([Ee]);return Ae.slice(0,Ae.indexOf(`
|
|
130
|
+
`))}function K(se,ae,fe,xe){let Ee=fe.enter("tableCell"),Ae=fe.enter("phrasing"),Re=fe.containerPhrasing(se,{...xe,before:w,after:w});return Ae(),Ee(),Re}function X(se,ae){return hC(se,{align:ae,alignDelimiters:T,padding:E,stringLength:R})}function ee(se,ae,fe){let xe=se.children,Ee=-1,Ae=[],Re=ae.enter("table");while(++Ee<xe.length)Ae[Ee]=re(xe[Ee],ae,fe);return Re(),Ae}function re(se,ae,fe){let xe=se.children,Ee=-1,Ae=[],Re=ae.enter("tableRow");while(++Ee<xe.length)Ae[Ee]=K(xe[Ee],se,ae,fe);return Re(),Ae}function ie(se,ae,fe){let xe=Ld.inlineCode(se,ae,fe);if(fe.stack.includes("tableCell"))xe=xe.replace(/\|/g,"\\$&");return xe}}function yS(){return{exit:{taskListCheckValueChecked:FC,taskListCheckValueUnchecked:FC,paragraph:WF}}}function vS(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:KF}}}function FC(g){let _=this.stack[this.stack.length-2];gn(_.type==="listItem"),_.checked=g.type==="taskListCheckValueChecked"}function WF(g){let _=this.stack[this.stack.length-2];if(_&&_.type==="listItem"&&typeof _.checked==="boolean"){let E=this.stack[this.stack.length-1];gn(E.type==="paragraph");let T=E.children[0];if(T&&T.type==="text"){let R=_.children,w=-1,B;while(++w<R.length){let Z=R[w];if(Z.type==="paragraph"){B=Z;break}}if(B===E){if(T.value=T.value.slice(1),T.value.length===0)E.children.shift();else if(E.position&&T.position&&typeof T.position.start.offset==="number")T.position.start.column++,T.position.start.offset++,E.position.start=Object.assign({},T.position.start)}}}this.exit(g)}function KF(g,_,E,T){let R=g.children[0],w=typeof g.checked==="boolean"&&R&&R.type==="paragraph",B="["+(g.checked?"x":" ")+"] ",Z=E.createTracker(T);if(w)Z.move(B);let K=Ld.listItem(g,_,E,{...T,...Z.current()});if(w)K=K.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,X);return K;function X(ee){return ee+B}}function xS(){return[rS(),iS(),aS(),ES(),yS()]}function RS(g){return{extensions:[oS(),sS(g),uS(),TS(g),vS()]}}var JF={tokenize:n5,partial:!0},BC={tokenize:r5,partial:!0},HC={tokenize:o5,partial:!0},qC={tokenize:i5,partial:!0},XF={tokenize:s5,partial:!0},jC={name:"wwwAutolink",tokenize:e5,previous:VC},ZC={name:"protocolAutolink",tokenize:t5,previous:GC},xi={name:"emailAutolink",tokenize:QF,previous:YC},ri={};function IS(){return{text:ri}}var Js=48;while(Js<123)if(ri[Js]=xi,Js++,Js===58)Js=65;else if(Js===91)Js=97;ri[43]=xi;ri[45]=xi;ri[46]=xi;ri[95]=xi;ri[72]=[xi,ZC];ri[104]=[xi,ZC];ri[87]=[xi,jC];ri[119]=[xi,jC];function QF(g,_,E){let T=this,R,w;return B;function B(re){if(!kS(re)||!YC.call(T,T.previous)||CS(T.events))return E(re);return g.enter("literalAutolink"),g.enter("literalAutolinkEmail"),Z(re)}function Z(re){if(kS(re))return g.consume(re),Z;if(re===64)return g.consume(re),K;return E(re)}function K(re){if(re===46)return g.check(XF,ee,X)(re);if(re===45||re===95||Bn(re))return w=!0,g.consume(re),K;return ee(re)}function X(re){return g.consume(re),R=!0,K}function ee(re){if(w&&R&&Yn(T.previous))return g.exit("literalAutolinkEmail"),g.exit("literalAutolink"),_(re);return E(re)}}function e5(g,_,E){let T=this;return R;function R(B){if(B!==87&&B!==119||!VC.call(T,T.previous)||CS(T.events))return E(B);return g.enter("literalAutolink"),g.enter("literalAutolinkWww"),g.check(JF,g.attempt(BC,g.attempt(HC,w),E),E)(B)}function w(B){return g.exit("literalAutolinkWww"),g.exit("literalAutolink"),_(B)}}function t5(g,_,E){let T=this,R="",w=!1;return B;function B(re){if((re===72||re===104)&&GC.call(T,T.previous)&&!CS(T.events))return g.enter("literalAutolink"),g.enter("literalAutolinkHttp"),R+=String.fromCodePoint(re),g.consume(re),Z;return E(re)}function Z(re){if(Yn(re)&&R.length<5)return R+=String.fromCodePoint(re),g.consume(re),Z;if(re===58){let ie=R.toLowerCase();if(ie==="http"||ie==="https")return g.consume(re),K}return E(re)}function K(re){if(re===47){if(g.consume(re),w)return X;return w=!0,K}return E(re)}function X(re){return re===null||Hs(re)||dn(re)||Qo(re)||qs(re)?E(re):g.attempt(BC,g.attempt(HC,ee),E)(re)}function ee(re){return g.exit("literalAutolinkHttp"),g.exit("literalAutolink"),_(re)}}function n5(g,_,E){let T=0;return R;function R(B){if((B===87||B===119)&&T<3)return T++,g.consume(B),R;if(B===46&&T===3)return g.consume(B),w;return E(B)}function w(B){return B===null?E(B):_(B)}}function r5(g,_,E){let T,R,w;return B;function B(X){if(X===46||X===95)return g.check(qC,K,Z)(X);if(X===null||dn(X)||Qo(X)||X!==45&&qs(X))return K(X);return w=!0,g.consume(X),B}function Z(X){if(X===95)T=!0;else R=T,T=void 0;return g.consume(X),B}function K(X){if(R||T||!w)return E(X);return _(X)}}function o5(g,_){let E=0,T=0;return R;function R(B){if(B===40)return E++,g.consume(B),R;if(B===41&&T<E)return w(B);if(B===33||B===34||B===38||B===39||B===41||B===42||B===44||B===46||B===58||B===59||B===60||B===63||B===93||B===95||B===126)return g.check(qC,_,w)(B);if(B===null||dn(B)||Qo(B))return _(B);return g.consume(B),R}function w(B){if(B===41)T++;return g.consume(B),R}}function i5(g,_,E){return T;function T(Z){if(Z===33||Z===34||Z===39||Z===41||Z===42||Z===44||Z===46||Z===58||Z===59||Z===63||Z===95||Z===126)return g.consume(Z),T;if(Z===38)return g.consume(Z),w;if(Z===93)return g.consume(Z),R;if(Z===60||Z===null||dn(Z)||Qo(Z))return _(Z);return E(Z)}function R(Z){if(Z===null||Z===40||Z===91||dn(Z)||Qo(Z))return _(Z);return T(Z)}function w(Z){return Yn(Z)?B(Z):E(Z)}function B(Z){if(Z===59)return g.consume(Z),T;if(Yn(Z))return g.consume(Z),B;return E(Z)}}function s5(g,_,E){return T;function T(w){return g.consume(w),R}function R(w){return Bn(w)?E(w):_(w)}}function VC(g){return g===null||g===40||g===42||g===95||g===91||g===93||g===126||dn(g)}function GC(g){return!Yn(g)}function YC(g){return!(g===47||kS(g))}function kS(g){return g===43||g===45||g===46||g===95||Bn(g)}function CS(g){let _=g.length,E=!1;while(_--){let T=g[_][1];if((T.type==="labelLink"||T.type==="labelImage")&&!T._balanced){E=!0;break}if(T._gfmAutolinkLiteralWalkedInto){E=!1;break}}if(g.length>0&&!E)g[g.length-1][1]._gfmAutolinkLiteralWalkedInto=!0;return E}var a5={tokenize:f5,partial:!0};function wS(){return{document:{[91]:{name:"gfmFootnoteDefinition",tokenize:d5,continuation:{tokenize:p5},exit:m5}},text:{[91]:{name:"gfmFootnoteCall",tokenize:l5},[93]:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:u5,resolveTo:c5}}}}function u5(g,_,E){let T=this,R=T.events.length,w=T.parser.gfmFootnotes||(T.parser.gfmFootnotes=[]),B;while(R--){let K=T.events[R][1];if(K.type==="labelImage"){B=K;break}if(K.type==="gfmFootnoteCall"||K.type==="labelLink"||K.type==="label"||K.type==="image"||K.type==="link")break}return Z;function Z(K){if(!B||!B._balanced)return E(K);let X=br(T.sliceSerialize({start:B.end,end:T.now()}));if(X.codePointAt(0)!==94||!w.includes(X.slice(1)))return E(K);return g.enter("gfmFootnoteCallLabelMarker"),g.consume(K),g.exit("gfmFootnoteCallLabelMarker"),_(K)}}function c5(g,_){let E=g.length,T;while(E--)if(g[E][1].type==="labelImage"&&g[E][0]==="enter"){T=g[E][1];break}g[E+1][1].type="data",g[E+3][1].type="gfmFootnoteCallLabelMarker";let R={type:"gfmFootnoteCall",start:Object.assign({},g[E+3][1].start),end:Object.assign({},g[g.length-1][1].end)},w={type:"gfmFootnoteCallMarker",start:Object.assign({},g[E+3][1].end),end:Object.assign({},g[E+3][1].end)};w.end.column++,w.end.offset++,w.end._bufferIndex++;let B={type:"gfmFootnoteCallString",start:Object.assign({},w.end),end:Object.assign({},g[g.length-1][1].start)},Z={type:"chunkString",contentType:"string",start:Object.assign({},B.start),end:Object.assign({},B.end)},K=[g[E+1],g[E+2],["enter",R,_],g[E+3],g[E+4],["enter",w,_],["exit",w,_],["enter",B,_],["enter",Z,_],["exit",Z,_],["exit",B,_],g[g.length-2],g[g.length-1],["exit",R,_]];return g.splice(E,g.length-E+1,...K),g}function l5(g,_,E){let T=this,R=T.parser.gfmFootnotes||(T.parser.gfmFootnotes=[]),w=0,B;return Z;function Z(re){return g.enter("gfmFootnoteCall"),g.enter("gfmFootnoteCallLabelMarker"),g.consume(re),g.exit("gfmFootnoteCallLabelMarker"),K}function K(re){if(re!==94)return E(re);return g.enter("gfmFootnoteCallMarker"),g.consume(re),g.exit("gfmFootnoteCallMarker"),g.enter("gfmFootnoteCallString"),g.enter("chunkString").contentType="string",X}function X(re){if(w>999||re===93&&!B||re===null||re===91||dn(re))return E(re);if(re===93){g.exit("chunkString");let ie=g.exit("gfmFootnoteCallString");if(!R.includes(br(T.sliceSerialize(ie))))return E(re);return g.enter("gfmFootnoteCallLabelMarker"),g.consume(re),g.exit("gfmFootnoteCallLabelMarker"),g.exit("gfmFootnoteCall"),_}if(!dn(re))B=!0;return w++,g.consume(re),re===92?ee:X}function ee(re){if(re===91||re===92||re===93)return g.consume(re),w++,X;return X(re)}}function d5(g,_,E){let T=this,R=T.parser.gfmFootnotes||(T.parser.gfmFootnotes=[]),w,B=0,Z;return K;function K(ae){return g.enter("gfmFootnoteDefinition")._container=!0,g.enter("gfmFootnoteDefinitionLabel"),g.enter("gfmFootnoteDefinitionLabelMarker"),g.consume(ae),g.exit("gfmFootnoteDefinitionLabelMarker"),X}function X(ae){if(ae===94)return g.enter("gfmFootnoteDefinitionMarker"),g.consume(ae),g.exit("gfmFootnoteDefinitionMarker"),g.enter("gfmFootnoteDefinitionLabelString"),g.enter("chunkString").contentType="string",ee;return E(ae)}function ee(ae){if(B>999||ae===93&&!Z||ae===null||ae===91||dn(ae))return E(ae);if(ae===93){g.exit("chunkString");let fe=g.exit("gfmFootnoteDefinitionLabelString");return w=br(T.sliceSerialize(fe)),g.enter("gfmFootnoteDefinitionLabelMarker"),g.consume(ae),g.exit("gfmFootnoteDefinitionLabelMarker"),g.exit("gfmFootnoteDefinitionLabel"),ie}if(!dn(ae))Z=!0;return B++,g.consume(ae),ae===92?re:ee}function re(ae){if(ae===91||ae===92||ae===93)return g.consume(ae),B++,ee;return ee(ae)}function ie(ae){if(ae===58){if(g.enter("definitionMarker"),g.consume(ae),g.exit("definitionMarker"),!R.includes(w))R.push(w);return Zt(g,se,"gfmFootnoteDefinitionWhitespace")}return E(ae)}function se(ae){return _(ae)}}function p5(g,_,E){return g.check(ei,_,g.attempt(a5,_,E))}function m5(g){g.exit("gfmFootnoteDefinition")}function f5(g,_,E){let T=this;return Zt(g,R,"gfmFootnoteDefinitionIndent",5);function R(w){let B=T.events[T.events.length-1];return B&&B[1].type==="gfmFootnoteDefinitionIndent"&&B[2].sliceSerialize(B[1],!0).length===4?_(w):E(w)}}function AS(g){let E=(g||{}).singleTilde,T={name:"strikethrough",tokenize:w,resolveAll:R};if(E===null||E===void 0)E=!0;return{text:{[126]:T},insideSpan:{null:[T]},attentionMarkers:{null:[126]}};function R(B,Z){let K=-1;while(++K<B.length)if(B[K][0]==="enter"&&B[K][1].type==="strikethroughSequenceTemporary"&&B[K][1]._close){let X=K;while(X--)if(B[X][0]==="exit"&&B[X][1].type==="strikethroughSequenceTemporary"&&B[X][1]._open&&B[K][1].end.offset-B[K][1].start.offset===B[X][1].end.offset-B[X][1].start.offset){B[K][1].type="strikethroughSequence",B[X][1].type="strikethroughSequence";let ee={type:"strikethrough",start:Object.assign({},B[X][1].start),end:Object.assign({},B[K][1].end)},re={type:"strikethroughText",start:Object.assign({},B[X][1].end),end:Object.assign({},B[K][1].start)},ie=[["enter",ee,Z],["enter",B[X][1],Z],["exit",B[X][1],Z],["enter",re,Z]],se=Z.parser.constructs.insideSpan.null;if(se)er(ie,ie.length,0,Xi(se,B.slice(X+1,K),Z));er(ie,ie.length,0,[["exit",re,Z],["enter",B[K][1],Z],["exit",B[K][1],Z],["exit",ee,Z]]),er(B,X-1,K-X+3,ie),K=X+ie.length-2;break}}K=-1;while(++K<B.length)if(B[K][1].type==="strikethroughSequenceTemporary")B[K][1].type="data";return B}function w(B,Z,K){let X=this.previous,ee=this.events,re=0;return ie;function ie(ae){if(X===126&&ee[ee.length-1][1].type!=="characterEscape")return K(ae);return B.enter("strikethroughSequenceTemporary"),se(ae)}function se(ae){let fe=Ka(X);if(ae===126){if(re>1)return K(ae);return B.consume(ae),re++,se}if(re<2&&!E)return K(ae);let xe=B.exit("strikethroughSequenceTemporary"),Ee=Ka(ae);return xe._open=!Ee||Ee===2&&Boolean(fe),xe._close=!fe||fe===2&&Boolean(Ee),Z(ae)}}}class PS{constructor(){this.map=[],this.index=new Map}add(g,_,E){h5(this,g,_,E)}consume(g){if(this.map.sort(function(R,w){return R[0]-w[0]}),this.map.length===0)return;let _=this.map.length,E=[];while(_>0)_-=1,E.push(g.slice(this.map[_][0]+this.map[_][1]),this.map[_][2]),g.length=this.map[_][0];E.push(g.slice()),g.length=0;let T=E.pop();while(T){for(let R of T)g.push(R);T=E.pop()}this.map.length=0,this.index.clear()}}function h5(g,_,E,T){if(E===0&&T.length===0)return;let R=g.index.get(_);if(R){R[1]+=E,R[2].push(...T);return}let w=[_,E,T];g.map.push(w),g.index.set(_,w)}function WC(g,_){let E=!1,T=[];while(_<g.length){let R=g[_];if(E){if(R[0]==="enter"){if(R[1].type==="tableContent")T.push(g[_+1][1].type==="tableDelimiterMarker"?"left":"none")}else if(R[1].type==="tableContent"){if(g[_-1][1].type==="tableDelimiterMarker"){let w=T.length-1;T[w]=T[w]==="left"?"center":"right"}}else if(R[1].type==="tableDelimiterRow")break}else if(R[0]==="enter"&&R[1].type==="tableDelimiterRow")E=!0;_+=1}return T}function zS(){return{flow:{null:{name:"table",tokenize:g5,resolveAll:b5}}}}function g5(g,_,E){let T=this,R=0,w=0,B;return Z;function Z(Oe){let Rt=T.events.length-1;while(Rt>-1){let{type:_t}=T.events[Rt][1];if(_t==="lineEnding"||_t==="linePrefix")Rt--;else break}let Nt=Rt>-1?T.events[Rt][1].type:null,mt=Nt==="tableHead"||Nt==="tableRow"?ke:K;if(mt===ke&&T.parser.lazy[T.now().line])return E(Oe);return mt(Oe)}function K(Oe){return g.enter("tableHead"),g.enter("tableRow"),X(Oe)}function X(Oe){if(Oe===124)return ee(Oe);return B=!0,w+=1,ee(Oe)}function ee(Oe){if(Oe===null)return E(Oe);if(vt(Oe)){if(w>1)return w=0,T.interrupt=!0,g.exit("tableRow"),g.enter("lineEnding"),g.consume(Oe),g.exit("lineEnding"),se;return E(Oe)}if(Ht(Oe))return Zt(g,ee,"whitespace")(Oe);if(w+=1,B)B=!1,R+=1;if(Oe===124)return g.enter("tableCellDivider"),g.consume(Oe),g.exit("tableCellDivider"),B=!0,ee;return g.enter("data"),re(Oe)}function re(Oe){if(Oe===null||Oe===124||dn(Oe))return g.exit("data"),ee(Oe);return g.consume(Oe),Oe===92?ie:re}function ie(Oe){if(Oe===92||Oe===124)return g.consume(Oe),re;return re(Oe)}function se(Oe){if(T.interrupt=!1,T.parser.lazy[T.now().line])return E(Oe);if(g.enter("tableDelimiterRow"),B=!1,Ht(Oe))return Zt(g,ae,"linePrefix",T.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Oe);return ae(Oe)}function ae(Oe){if(Oe===45||Oe===58)return xe(Oe);if(Oe===124)return B=!0,g.enter("tableCellDivider"),g.consume(Oe),g.exit("tableCellDivider"),fe;return Ge(Oe)}function fe(Oe){if(Ht(Oe))return Zt(g,xe,"whitespace")(Oe);return xe(Oe)}function xe(Oe){if(Oe===58)return w+=1,B=!0,g.enter("tableDelimiterMarker"),g.consume(Oe),g.exit("tableDelimiterMarker"),Ee;if(Oe===45)return w+=1,Ee(Oe);if(Oe===null||vt(Oe))return Ve(Oe);return Ge(Oe)}function Ee(Oe){if(Oe===45)return g.enter("tableDelimiterFiller"),Ae(Oe);return Ge(Oe)}function Ae(Oe){if(Oe===45)return g.consume(Oe),Ae;if(Oe===58)return B=!0,g.exit("tableDelimiterFiller"),g.enter("tableDelimiterMarker"),g.consume(Oe),g.exit("tableDelimiterMarker"),Re;return g.exit("tableDelimiterFiller"),Re(Oe)}function Re(Oe){if(Ht(Oe))return Zt(g,Ve,"whitespace")(Oe);return Ve(Oe)}function Ve(Oe){if(Oe===124)return ae(Oe);if(Oe===null||vt(Oe)){if(!B||R!==w)return Ge(Oe);return g.exit("tableDelimiterRow"),g.exit("tableHead"),_(Oe)}return Ge(Oe)}function Ge(Oe){return E(Oe)}function ke(Oe){return g.enter("tableRow"),qe(Oe)}function qe(Oe){if(Oe===124)return g.enter("tableCellDivider"),g.consume(Oe),g.exit("tableCellDivider"),qe;if(Oe===null||vt(Oe))return g.exit("tableRow"),_(Oe);if(Ht(Oe))return Zt(g,qe,"whitespace")(Oe);return g.enter("data"),pt(Oe)}function pt(Oe){if(Oe===null||Oe===124||dn(Oe))return g.exit("data"),qe(Oe);return g.consume(Oe),Oe===92?ht:pt}function ht(Oe){if(Oe===92||Oe===124)return g.consume(Oe),pt;return pt(Oe)}}function b5(g,_){let E=-1,T=!0,R=0,w=[0,0,0,0],B=[0,0,0,0],Z=!1,K=0,X,ee,re,ie=new PS;while(++E<g.length){let se=g[E],ae=se[1];if(se[0]==="enter"){if(ae.type==="tableHead"){if(Z=!1,K!==0)KC(ie,_,K,X,ee),ee=void 0,K=0;X={type:"table",start:Object.assign({},ae.start),end:Object.assign({},ae.end)},ie.add(E,0,[["enter",X,_]])}else if(ae.type==="tableRow"||ae.type==="tableDelimiterRow"){if(T=!0,re=void 0,w=[0,0,0,0],B=[0,E+1,0,0],Z)Z=!1,ee={type:"tableBody",start:Object.assign({},ae.start),end:Object.assign({},ae.end)},ie.add(E,0,[["enter",ee,_]]);R=ae.type==="tableDelimiterRow"?2:ee?3:1}else if(R&&(ae.type==="data"||ae.type==="tableDelimiterMarker"||ae.type==="tableDelimiterFiller")){if(T=!1,B[2]===0){if(w[1]!==0)B[0]=B[1],re=qf(ie,_,w,R,void 0,re),w=[0,0,0,0];B[2]=E}}else if(ae.type==="tableCellDivider")if(T)T=!1;else{if(w[1]!==0)B[0]=B[1],re=qf(ie,_,w,R,void 0,re);w=B,B=[w[1],E,0,0]}}else if(ae.type==="tableHead")Z=!0,K=E;else if(ae.type==="tableRow"||ae.type==="tableDelimiterRow"){if(K=E,w[1]!==0)B[0]=B[1],re=qf(ie,_,w,R,E,re);else if(B[1]!==0)re=qf(ie,_,B,R,E,re);R=0}else if(R&&(ae.type==="data"||ae.type==="tableDelimiterMarker"||ae.type==="tableDelimiterFiller"))B[3]=E}if(K!==0)KC(ie,_,K,X,ee);ie.consume(_.events),E=-1;while(++E<_.events.length){let se=_.events[E];if(se[0]==="enter"&&se[1].type==="table")se[1]._align=WC(_.events,E)}return g}function qf(g,_,E,T,R,w){let B=T===1?"tableHeader":T===2?"tableDelimiter":"tableData",Z="tableContent";if(E[0]!==0)w.end=Object.assign({},uu(_.events,E[0])),g.add(E[0],0,[["exit",w,_]]);let K=uu(_.events,E[1]);if(w={type:B,start:Object.assign({},K),end:Object.assign({},K)},g.add(E[1],0,[["enter",w,_]]),E[2]!==0){let X=uu(_.events,E[2]),ee=uu(_.events,E[3]),re={type:"tableContent",start:Object.assign({},X),end:Object.assign({},ee)};if(g.add(E[2],0,[["enter",re,_]]),T!==2){let ie=_.events[E[2]],se=_.events[E[3]];if(ie[1].end=Object.assign({},se[1].end),ie[1].type="chunkText",ie[1].contentType="text",E[3]>E[2]+1){let ae=E[2]+1,fe=E[3]-E[2]-1;g.add(ae,fe,[])}}g.add(E[3]+1,0,[["exit",re,_]])}if(R!==void 0)w.end=Object.assign({},uu(_.events,R)),g.add(R,0,[["exit",w,_]]),w=void 0;return w}function KC(g,_,E,T,R){let w=[],B=uu(_.events,E);if(R)R.end=Object.assign({},B),w.push(["exit",R,_]);T.end=Object.assign({},B),w.push(["exit",T,_]),g.add(E+1,0,w)}function uu(g,_){let E=g[_],T=E[0]==="enter"?"start":"end";return E[1][T]}var S5={name:"tasklistCheck",tokenize:_5};function NS(){return{text:{[91]:S5}}}function _5(g,_,E){let T=this;return R;function R(K){if(T.previous!==null||!T._gfmTasklistFirstContentOfListItem)return E(K);return g.enter("taskListCheck"),g.enter("taskListCheckMarker"),g.consume(K),g.exit("taskListCheckMarker"),w}function w(K){if(dn(K))return g.enter("taskListCheckValueUnchecked"),g.consume(K),g.exit("taskListCheckValueUnchecked"),B;if(K===88||K===120)return g.enter("taskListCheckValueChecked"),g.consume(K),g.exit("taskListCheckValueChecked"),B;return E(K)}function B(K){if(K===93)return g.enter("taskListCheckMarker"),g.consume(K),g.exit("taskListCheckMarker"),g.exit("taskListCheck"),Z;return E(K)}function Z(K){if(vt(K))return _(K);if(Ht(K))return g.check({tokenize:E5},_,E)(K);return E(K)}}function E5(g,_,E){return Zt(g,T,"whitespace");function T(R){return R===null?E(R):_(R)}}function JC(g){return Ym([IS(),wS(),AS(g),zS(),NS()])}var T5={};function jf(g){let _=this,E=g||T5,T=_.data(),R=T.micromarkExtensions||(T.micromarkExtensions=[]),w=T.fromMarkdownExtensions||(T.fromMarkdownExtensions=[]),B=T.toMarkdownExtensions||(T.toMarkdownExtensions=[]);R.push(JC(E)),w.push(xS()),B.push(RS(E))}var QC={small:"text-body-small",medium:"text-body-medium",large:"text-body-large"};function cu(g){if(typeof g==="string")return g;if(typeof g==="number")return String(g);if(Array.isArray(g))return g.map(cu).join("");if(q(g))return cu(g.props.children);return""}var XC={typescript:"TypeScript",ts:"TypeScript",tsx:"TSX",javascript:"JavaScript",js:"JavaScript",jsx:"JSX",python:"Python",py:"Python",rust:"Rust",rs:"Rust",bash:"Bash",sh:"Bash",shell:"Bash",zsh:"Bash",json:"JSON",jsonc:"JSONC",sql:"SQL",html:"HTML",css:"CSS",scss:"SCSS",sass:"Sass",yaml:"YAML",yml:"YAML",markdown:"Markdown",md:"Markdown",go:"Go",golang:"Go",java:"Java",c:"C",cpp:"C++","c++":"C++",csharp:"C#",cs:"C#","c#":"C#",ruby:"Ruby",rb:"Ruby",php:"PHP",swift:"Swift",kotlin:"Kotlin",kt:"Kotlin",xml:"XML",toml:"TOML",dockerfile:"Dockerfile",docker:"Dockerfile",graphql:"GraphQL",gql:"GraphQL",wasm:"WebAssembly",lua:"Lua",r:"R",diff:"Diff",plaintext:"Text",text:"Text",txt:"Text"};function y5(g){if(!g)return{raw:"",label:"Code"};let _=g.replace(/^language-|^lang-/,"").toLowerCase().trim();if(XC[_])return{raw:_,label:XC[_]};let E=_.length<=3?_.toUpperCase():_.charAt(0).toUpperCase()+_.slice(1);return{raw:_,label:E}}function v5({code:g,language:_,onCopy:E,className:T,children:R,...w}){let{node:B,...Z}=w,[K,X]=n(!1),ee=o(null);i(()=>()=>{if(ee.current)clearTimeout(ee.current)},[]);let re=q(R)?R:null,ie=re?re.props:null,se=_??T?.match(/language-([a-zA-Z0-9_+#-]+)/)?.[1]??ie?.className?.match(/language-([a-zA-Z0-9_+#-]+)/)?.[1],{raw:ae,label:fe}=y5(se),xe=g??(ie?.children?cu(ie.children):cu(R)),Ee=xe,Ae=xe.replace(/\n$/,""),Re=async()=>{try{if(typeof navigator<"u"&&navigator.clipboard?.writeText)await navigator.clipboard.writeText(Ae)}catch{}if(E?.(Ae),X(!0),ee.current)clearTimeout(ee.current);ee.current=setTimeout(()=>{X(!1)},2000)};return t("div",{className:s("my-3 overflow-hidden rounded-medium border border-outline-variant bg-surface-container-highest",T),...Z,children:[t("div",{className:"flex items-center justify-between border-b border-outline-variant bg-surface-container px-3 py-1.5",children:[e("span",{className:"inline-flex items-center rounded-extra-small bg-surface-container-high px-2 py-0.5 text-label-small font-medium text-on-surface-variant border border-outline-variant/60",children:fe}),t("button",{type:"button",onClick:Re,className:s("inline-flex items-center gap-1.5 rounded-small px-2 py-1 text-label-small font-medium transition-colors duration-200",K?"text-success":"text-on-surface-variant hover:bg-on-surface/8 hover:text-on-surface active:bg-on-surface/12","focus-visible:outline-2 focus-visible:outline-primary"),"aria-label":K?"Copied":"Copy code",title:K?"Copied!":"Copy code",children:[e(x,{name:K?"check":"content_copy",size:16,className:K?"text-success":void 0}),e("span",{children:K?"Copied!":"Copy"})]})]}),e("pre",{className:"overflow-x-auto p-3 font-code text-body-small text-on-surface bg-surface-container-highest [&_code]:bg-transparent [&_code]:p-0 [&_code]:text-[length:inherit]",children:e("code",{className:ae?`language-${ae}`:void 0,children:Ee})})]})}var x5={alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",pi:"π",rho:"ρ",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",Gamma:"Γ",Delta:"Δ",Theta:"Θ",Lambda:"Λ",Xi:"Ξ",Pi:"Π",Sigma:"Σ",Phi:"Φ",Psi:"Ψ",Omega:"Ω",times:"×",div:"÷",pm:"±",mp:"∓",le:"≤",leq:"≤",ge:"≥",geq:"≥",approx:"≈",neq:"≠",ne:"≠",infty:"∞",cdot:"·",circ:"°",partial:"∂",nabla:"∇",sum:"∑",prod:"∏",int:"∫",sqrt:"√",in:"∈",notin:"∉",subset:"⊂",subseteq:"⊆",cup:"∪",cap:"∩",to:"→",rightarrow:"→",leftarrow:"←",leftrightarrow:"↔",Rightarrow:"⇒",Leftarrow:"⇐",Leftrightarrow:"⇔",forall:"∀",exists:"∃"};function Dd(g){let _=g.split(/(\^\{[^}]+\}|\^[-+]?[a-zA-Z0-9\u0370-\u03FF\u2100-\u214F]|_\{[^}]+\}|_[-+]?[a-zA-Z0-9\u0370-\u03FF\u2100-\u214F])/g);if(_.length===1)return g;let E=new Map;return _.map((T)=>{let R=E.get(T)??0;E.set(T,R+1);let w=`${T}:${R}`;if(T.startsWith("^")){let B=T.startsWith("^{")&&T.endsWith("}")?T.slice(2,-1):T.slice(1);return e("sup",{className:"text-[0.75em] leading-none",children:B},w)}if(T.startsWith("_")){let B=T.startsWith("_{")&&T.endsWith("}")?T.slice(2,-1):T.slice(1);return e("sub",{className:"text-[0.75em] leading-none",children:B},w)}return T})}function ew(g){let _=g.replace(/\\+([a-zA-Z]+)/g,(T,R)=>x5[R]??T),E=/\\+frac\{([^{}]+)\}\{([^{}]+)\}/g;if(E.test(_)){let T=[],R=0;if(_.replace(E,(w,B,Z,K)=>{if(K>R)T.push(Dd(_.slice(R,K)));return T.push(t("span",{className:"inline-flex flex-col items-center align-middle mx-1 text-center text-[0.85em] leading-none not-italic",children:[e("span",{className:"border-b border-current px-0.5 pb-0.5",children:Dd(B)}),e("span",{className:"px-0.5 pt-0.5",children:Dd(Z)})]},`frac-${K}`)),R=K+w.length,w}),R<_.length)T.push(Dd(_.slice(R)));return T}return Dd(_)}function R5({math:g,className:_,...E}){return e("span",{className:s("inline-flex items-center px-1 font-serif italic font-medium text-primary",_),...E,children:ew(g)})}function k5({math:g,className:_,...E}){return e("div",{className:s("my-3 flex justify-center overflow-x-auto rounded-medium bg-surface-container-low/40 px-4 py-2 text-title-medium font-serif italic font-medium text-primary",_),...E,children:ew(g)})}function tw(g){if(!g.children)return;let _=[];for(let E of g.children){if(E.type==="paragraph"&&Array.isArray(E.children)){if(E.children.some((R)=>R.type==="text"&&/\$\$[\s\S]+?\$\$/.test(R.value))){let R=[];for(let w of E.children)if(w.type==="text"&&/\$\$[\s\S]+?\$\$/.test(w.value)){let B=w.value.split(/(\$\$[\s\S]+?\$\$)/g);for(let Z of B)if(Z.startsWith("$$")&&Z.endsWith("$$")&&Z.length>=4){if(R.length>0)_.push({type:"paragraph",children:R}),R=[];let K=Z.slice(2,-2).trim();_.push({type:"mathBlock",data:{hName:"div",hProperties:{className:"math-block","data-math":K},hChildren:[{type:"text",value:K}]},children:[{type:"text",value:K}]})}else if(Z.trim().length>0)R.push({type:"text",value:Z})}else R.push(w);if(R.length>0)_.push({type:"paragraph",children:R});continue}}tw(E),_.push(E)}g.children=_}function nw(g){if(!g.children)return;let _=[];for(let E of g.children)if(E.type==="text"&&typeof E.value==="string"&&E.value.includes("$")){let T=E.value.split(/((?<!\\)\$(?!\s)[^$\n]+?(?<!\s)\$(?!\d))/g);for(let R of T)if(R.startsWith("$")&&R.endsWith("$")&&!R.startsWith("$$")&&R.length>2){let w=R.slice(1,-1).trim();_.push({type:"mathInline",data:{hName:"span",hProperties:{className:"math-inline","data-math":w},hChildren:[{type:"text",value:w}]},children:[{type:"text",value:w}]})}else if(R)_.push({type:"text",value:R})}else nw(E),_.push(E);g.children=_}function I5(g){tw(g),nw(g)}function C5(){return I5}function w5(g){let _=QC[g];return{h1:({node:E,className:T,children:R,...w})=>e("h1",{className:s("mt-4 mb-2 text-headline-small text-on-surface first:mt-0",T),...w,children:R}),h2:({node:E,className:T,children:R,...w})=>e("h2",{className:s("mt-4 mb-2 text-title-large text-on-surface first:mt-0",T),...w,children:R}),h3:({node:E,className:T,children:R,...w})=>e("h3",{className:s("mt-3 mb-1.5 text-title-medium text-on-surface first:mt-0",T),...w,children:R}),h4:({node:E,className:T,children:R,...w})=>e("h4",{className:s("mt-3 mb-1 text-title-small text-on-surface first:mt-0",T),...w,children:R}),h5:({node:E,className:T,children:R,...w})=>e("h5",{className:s("mt-3 mb-1 text-title-small text-on-surface-variant first:mt-0",T),...w,children:R}),h6:({node:E,className:T,children:R,...w})=>e("h6",{className:s("mt-3 mb-1 text-label-large text-on-surface-variant first:mt-0",T),...w,children:R}),p:({node:E,className:T,...R})=>e("p",{className:s("my-2 first:mt-0 last:mb-0",_,T),...R}),a:({node:E,className:T,children:R,...w})=>e("a",{className:s("text-primary underline underline-offset-2 hover:decoration-2","rounded-extra-small outline-none focus-visible:outline-3 focus-visible:outline-secondary focus-visible:outline-offset-2",T),...w,children:R}),strong:({node:E,className:T,...R})=>e("strong",{className:s("font-semibold text-on-surface",T),...R}),ul:({node:E,className:T,...R})=>e("ul",{className:s("my-2 list-disc pl-6 marker:text-on-surface-variant",_,T),...R}),ol:({node:E,className:T,...R})=>e("ol",{className:s("my-2 list-decimal pl-6 marker:text-on-surface-variant",_,T),...R}),li:({node:E,className:T,...R})=>e("li",{className:s("my-1",T),...R}),blockquote:({node:E,className:T,...R})=>e("blockquote",{className:s("my-3 border-l-4 border-outline-variant pl-4 text-on-surface-variant",T),...R}),code:({node:E,className:T,...R})=>e("code",{className:s("rounded-extra-small bg-surface-container-highest px-1 py-0.5 font-code text-[0.9em] text-on-surface",T),...R}),pre:({node:E,children:T,className:R,style:w})=>e(v5,{className:R,style:w,children:T}),hr:({node:E,className:T,...R})=>e("hr",{className:s("my-4 border-outline-variant",T),...R}),table:({node:E,className:T,...R})=>e("div",{className:"my-3 overflow-x-auto rounded-small border border-outline-variant",children:e("table",{className:s("w-full border-collapse",_,T),...R})}),thead:({node:E,className:T,...R})=>e("thead",{className:s("bg-surface-container",T),...R}),th:({node:E,className:T,...R})=>e("th",{className:s("border-b border-outline-variant px-3 py-2 text-left text-title-small text-on-surface",T),...R}),td:({node:E,className:T,...R})=>e("td",{className:s("border-t border-outline-variant px-3 py-2 text-on-surface",T),...R}),img:({node:E,className:T,alt:R,...w})=>e("img",{className:s("my-2 max-w-full rounded-medium",T),alt:R??"",...w}),input:({node:E,className:T,...R})=>e("input",{className:s("mr-2 accent-primary",T),...R}),div:({node:E,className:T,children:R,...w})=>{if(T?.includes("math-block")){let B=w["data-math"]??cu(R);return e(k5,{math:B,className:T})}return e("div",{className:T,...w,children:R})},span:({node:E,className:T,children:R,...w})=>{if(T?.includes("math-inline")){let B=w["data-math"]??cu(R);return e(R5,{math:B,className:T})}return e("span",{className:T,...w,children:R})}}}var OS=a(({content:g,className:_,size:E="medium",allowHtml:T=!1},R)=>e("div",{ref:R,className:s("markdown min-w-0 text-on-surface",QC[E],_),children:e(Rb,{remarkPlugins:[jf,C5],rehypePlugins:T?[Uf]:void 0,components:w5(E),children:g})}));OS.displayName="Markdown";function Zf({content:g,isUser:_,isStreaming:E=!1,onCopy:T,onDislike:R,onFork:w,variant:B="default",className:Z}){let K=B==="codex";return t("div",{className:s("group flex flex-col py-1.5 w-full",_?"items-end":"items-start",Z),children:[e("div",{className:s("min-w-0",_?K?"max-w-[75%] rounded-[28px] bg-surface-container-high px-5 py-3 text-body-large text-on-surface shadow-xs":"max-w-[80%] rounded-large rounded-br-extra-small bg-secondary-container px-4 py-2.5 text-body-large text-on-secondary-container":"w-full max-w-full bg-transparent text-body-large text-on-surface"),"aria-busy":E||void 0,children:_?e("div",{className:"whitespace-pre-wrap break-words",children:g}):e(OS,{content:g,size:"large",className:"break-words font-sans"})}),!_&&(T||R||w)?t("div",{className:"mt-1.5 flex items-center gap-1 opacity-0 transition-opacity duration-200 ease-standard group-focus-within:opacity-100 group-hover:opacity-100",children:[T&&e(Pe,{icon:"content_copy",variant:"standard",size:"sm",onClick:()=>T(g),"aria-label":E?"Copy Streaming Message":"Copy Message",title:E?"Copy streaming message":"Copier"}),R&&e(Pe,{icon:"thumb_down",variant:"standard",size:"sm",onClick:()=>R(g),"aria-label":"Dislike",title:"Je n'aime pas"}),w&&e(Pe,{icon:"call_split",variant:"standard",size:"sm",onClick:w,"aria-label":"Fork",title:"Bifurquer à partir de ce tour"})]}):null]})}r();function A5(g,_=""){let E=_.trim().toLowerCase();return(E?g.filter((R)=>R.name.toLowerCase().includes(E)||R.provider.toLowerCase().includes(E)):g).reduce((R,w)=>{if(!R[w.provider])R[w.provider]=[];return R[w.provider].push(w),R},Object.create(null))}function P5({grouped:g,value:_,onSelect:E,className:T}){let R=Object.entries(g),w=R.flatMap(([,X])=>X),[B,Z]=n(_),K=w.some((X)=>X.id===B)?B:w.find((X)=>X.id===_)?.id??w[0]?.id;return t("div",{role:"listbox","aria-label":"Models",tabIndex:-1,onKeyDown:(X)=>{if(X.defaultPrevented)return;let ee=Array.from(X.currentTarget.querySelectorAll('[role="option"]')),re=ee.indexOf(X.target);if(re<0)return;let ie;switch(X.key){case"ArrowDown":ie=(re+1)%ee.length;break;case"ArrowUp":ie=(re-1+ee.length)%ee.length;break;case"Home":ie=0;break;case"End":ie=ee.length-1;break;default:return}X.preventDefault(),ee[ie].focus()},className:s("flex flex-col",T),children:[R.map(([X,ee],re)=>t("div",{role:"group","aria-label":X,className:s(re>0&&"mt-1 border-t border-outline-variant pt-1"),children:[e("div",{className:"px-3 pt-2 pb-1 text-title-small text-on-surface-variant",children:X}),ee.map((ie)=>{let se=ie.id===_;return t("button",{type:"button",role:"option","aria-selected":se,tabIndex:ie.id===K?0:-1,onFocus:()=>Z(ie.id),onClick:()=>E(ie.id),className:s("flex min-h-12 w-full items-center gap-3 px-3 py-2 text-left","transition-colors duration-200 ease-standard",se?"bg-secondary-container text-on-secondary-container":"text-on-surface hover:bg-on-surface/8 active:bg-on-surface/10",ci,"focus-visible:outline-offset-[-3px]"),children:[t("div",{className:"min-w-0 flex-1",children:[e("div",{className:"truncate text-label-large",children:ie.name}),ie.context_window||ie.capabilities?.length?t("div",{className:"mt-0.5 flex flex-wrap items-center gap-1",children:[ie.context_window?t("span",{className:s("text-body-small",se?"text-on-secondary-container":"text-on-surface-variant"),children:[ie.context_window.toLocaleString()," tokens"]}):null,ie.capabilities?.map((ae)=>e("span",{className:s("inline-flex h-5 items-center rounded-small border border-outline-variant px-1.5 text-label-small",se?"text-on-secondary-container":"text-on-surface-variant"),children:ae},ae))]}):null]}),se&&e(x,{name:"check",size:20,className:"shrink-0"})]},ie.id)})]},X)),R.length===0&&e("div",{className:"px-3 py-3 text-center text-body-small text-on-surface-variant",children:"No models found"})]})}function z5({value:g,onChange:_,placeholder:E}){let T=o(null);return i(()=>{T.current?.focus()},[]),e("div",{className:"px-2 pb-2",children:t("label",{className:"flex h-10 items-center gap-2 rounded-full bg-surface-container-high px-3 text-on-surface-variant focus-within:bg-surface-container-highest",children:[e(x,{name:"search",size:20,className:"shrink-0"}),e("input",{ref:T,value:g,onChange:(R)=>_(R.target.value),placeholder:E,"aria-label":E,className:"min-w-0 flex-1 bg-transparent text-body-large text-on-surface outline-none placeholder:text-on-surface-variant"})]})})}var MS=a(({models:g,value:_,onChange:E,placeholder:T="Select model...",searchPlaceholder:R="Search models...",variant:w,size:B,popover:Z,className:K,disabled:X},ee)=>{let re=mx(),ie=Z??re,[se,ae]=n(""),fe=g.find((Ee)=>Ee.id===_),xe=l(()=>A5(g,se),[g,se]);return t(Ui.Root,{open:ie.open,onOpenChange:(Ee)=>{if(ie.setOpen(Ee),!Ee)ae("")},children:[e(Ui.Trigger,{asChild:!0,children:e(ac,{ref:ee,variant:w,size:B,disabled:X,"aria-haspopup":"listbox",className:s("w-full",K),children:fe?.name??T})}),t(Ui.Content,{align:"end",sideOffset:8,style:{width:280},className:"overflow-hidden rounded-extra-small! py-2",children:[e(z5,{value:se,onChange:ae,placeholder:R}),e("div",{className:"max-h-[320px] overflow-y-auto",children:e(P5,{grouped:xe,value:_,onSelect:(Ee)=>{E(Ee),ie.setOpen(!1),ae("")}})})]})]})});MS.displayName="ModelSelector";var rw={initial:{scale:0.6,opacity:0},animate:{scale:1,opacity:1,transition:{duration:k.short4,ease:v.emphasizedDecelerate}},exit:{scale:0.6,opacity:0,transition:{duration:k.short3,ease:v.emphasizedAccelerate}}};function LS({draft:g,onDraftChange:_,onSend:E,placeholder:T="Ask something...",heading:R,isSending:w=!1,projectSelector:B,modelSelector:Z,onOpenVoice:K,toolbarExtra:X,onStop:ee,className:re}){let ie=!w&&g.trim().length>0,se=w&&!!ee;return t(F,{children:[R&&t("div",{className:"mb-3 flex items-center gap-2 px-1 text-title-small text-on-surface-variant",children:[e(x,{name:"auto_awesome",size:18,filled:!0,className:"text-primary"}),R]}),t("div",{className:s("m3-chat-composer rounded-extra-large bg-surface-container-high px-4 pt-3 pb-2 text-on-surface","transition-colors duration-200 ease-standard focus-within:bg-surface-container-highest",re),children:[e("textarea",{value:g,onChange:(ae)=>_(ae.target.value),onKeyDown:(ae)=>{if(ae.key==="Enter"&&!ae.shiftKey)ae.preventDefault(),E()},placeholder:T,"aria-label":T,rows:2,className:"block w-full resize-none border-0 bg-transparent px-1 text-body-large text-on-surface caret-primary outline-none placeholder:text-on-surface-variant focus:outline-none focus:ring-0"}),t("div",{className:"mt-2 flex items-center justify-between gap-2",children:[B?e("div",{className:"w-[210px]",children:t(Ui.Root,{open:B.popover.open,onOpenChange:B.popover.setOpen,children:[e(Ui.Trigger,{asChild:!0,children:e(ac,{className:"w-full","aria-haspopup":"listbox",children:B.value})}),e(Ui.Content,{align:"start",sideOffset:8,className:"min-w-[210px] overflow-hidden rounded-extra-small! py-2",children:e("div",{role:"listbox","aria-label":"Projects",children:B.options.map((ae)=>{let fe=ae===B.value;return t("button",{type:"button",role:"option","aria-selected":fe,onClick:()=>{B.onChange(ae),B.popover.setOpen(!1)},className:s("flex h-12 w-full items-center gap-3 px-3 text-left text-label-large","transition-colors duration-200 ease-standard",fe?"bg-secondary-container text-on-secondary-container":"text-on-surface hover:bg-on-surface/8",ci,"focus-visible:outline-offset-[-3px]"),children:[e("span",{className:"min-w-0 flex-1 truncate",children:ae}),fe&&e(x,{name:"check",size:20})]},ae)})})})]})}):e("div",{}),t(V.div,{layout:!0,className:"flex items-center gap-1",children:[Z&&e("div",{className:"w-[180px]",children:e(MS,{models:Z.options,value:Z.value,onChange:Z.onChange,size:"md"})}),X,K&&e(Pe,{icon:"mic",variant:"standard",onClick:K,disabled:w,"aria-label":"Open Voice Input"}),e(le,{initial:!1,mode:"popLayout",children:se?e(V.button,{type:"button",...rw,onClick:ee,"aria-label":"Stop",className:s("flex size-10 shrink-0 items-center justify-center rounded-full bg-primary text-on-primary","transition-colors duration-200 ease-standard hover:bg-primary/92 active:bg-primary/90",ci),children:e(x,{name:"stop",size:24,filled:!0})},"stop"):ie?e(V.button,{type:"button",...rw,onClick:E,"aria-label":"Send",className:s("flex size-10 shrink-0 items-center justify-center rounded-full bg-primary text-on-primary","transition-colors duration-200 ease-standard hover:bg-primary/92 active:bg-primary/90",ci),children:e(x,{name:"arrow_upward",size:24})},"send"):null})]})]})]})]})}var zr=function(g){return g.TEXT_MESSAGE_START="TEXT_MESSAGE_START",g.TEXT_MESSAGE_CONTENT="TEXT_MESSAGE_CONTENT",g.TEXT_MESSAGE_END="TEXT_MESSAGE_END",g.TEXT_MESSAGE_CHUNK="TEXT_MESSAGE_CHUNK",g.TOOL_CALL_START="TOOL_CALL_START",g.TOOL_CALL_ARGS="TOOL_CALL_ARGS",g.TOOL_CALL_END="TOOL_CALL_END",g.TOOL_CALL_CHUNK="TOOL_CALL_CHUNK",g.TOOL_CALL_RESULT="TOOL_CALL_RESULT",g.STATE_SNAPSHOT="STATE_SNAPSHOT",g.STATE_DELTA="STATE_DELTA",g.MESSAGES_SNAPSHOT="MESSAGES_SNAPSHOT",g.ACTIVITY_SNAPSHOT="ACTIVITY_SNAPSHOT",g.ACTIVITY_DELTA="ACTIVITY_DELTA",g.RAW="RAW",g.CUSTOM="CUSTOM",g.RUN_STARTED="RUN_STARTED",g.RUN_FINISHED="RUN_FINISHED",g.RUN_ERROR="RUN_ERROR",g.STEP_STARTED="STEP_STARTED",g.STEP_FINISHED="STEP_FINISHED",g.REASONING_START="REASONING_START",g.REASONING_MESSAGE_START="REASONING_MESSAGE_START",g.REASONING_MESSAGE_CONTENT="REASONING_MESSAGE_CONTENT",g.REASONING_MESSAGE_END="REASONING_MESSAGE_END",g.REASONING_MESSAGE_CHUNK="REASONING_MESSAGE_CHUNK",g.REASONING_END="REASONING_END",g.REASONING_ENCRYPTED_VALUE="REASONING_ENCRYPTED_VALUE",g.SUBAGENT_STARTED="SUBAGENT_STARTED",g.SUBAGENT_FINISHED="SUBAGENT_FINISHED",g.SUBAGENT_ERROR="SUBAGENT_ERROR",g}({});var fn=function(g){return g.TEXT_MESSAGE_START="TEXT_MESSAGE_START",g.TEXT_MESSAGE_CONTENT="TEXT_MESSAGE_CONTENT",g.TEXT_MESSAGE_END="TEXT_MESSAGE_END",g.TEXT_MESSAGE_CHUNK="TEXT_MESSAGE_CHUNK",g.TOOL_CALL_START="TOOL_CALL_START",g.TOOL_CALL_ARGS="TOOL_CALL_ARGS",g.TOOL_CALL_END="TOOL_CALL_END",g.TOOL_CALL_CHUNK="TOOL_CALL_CHUNK",g.TOOL_CALL_RESULT="TOOL_CALL_RESULT",g.STATE_SNAPSHOT="STATE_SNAPSHOT",g.STATE_DELTA="STATE_DELTA",g.MESSAGES_SNAPSHOT="MESSAGES_SNAPSHOT",g.ACTIVITY_SNAPSHOT="ACTIVITY_SNAPSHOT",g.ACTIVITY_DELTA="ACTIVITY_DELTA",g.RAW="RAW",g.CUSTOM="CUSTOM",g.RUN_STARTED="RUN_STARTED",g.RUN_FINISHED="RUN_FINISHED",g.RUN_ERROR="RUN_ERROR",g.STEP_STARTED="STEP_STARTED",g.STEP_FINISHED="STEP_FINISHED",g.REASONING_START="REASONING_START",g.REASONING_MESSAGE_START="REASONING_MESSAGE_START",g.REASONING_MESSAGE_CONTENT="REASONING_MESSAGE_CONTENT",g.REASONING_MESSAGE_END="REASONING_MESSAGE_END",g.REASONING_MESSAGE_CHUNK="REASONING_MESSAGE_CHUNK",g.REASONING_END="REASONING_END",g.REASONING_ENCRYPTED_VALUE="REASONING_ENCRYPTED_VALUE",g.SUBAGENT_STARTED="SUBAGENT_STARTED",g.SUBAGENT_FINISHED="SUBAGENT_FINISHED",g.SUBAGENT_ERROR="SUBAGENT_ERROR",g}({});var fce=Object.freeze({status:"aborted"});function He(g,_,E){function T(Z,K){var X;Object.defineProperty(Z,"_zod",{value:Z._zod??{},enumerable:!1}),(X=Z._zod).traits??(X.traits=new Set),Z._zod.traits.add(g),_(Z,K);for(let ee in B.prototype)if(!(ee in Z))Object.defineProperty(Z,ee,{value:B.prototype[ee].bind(Z)});Z._zod.constr=B,Z._zod.def=K}let R=E?.Parent??Object;class w extends R{}Object.defineProperty(w,"name",{value:g});function B(Z){var K;let X=E?.Parent?new w:this;T(X,Z),(K=X._zod).deferred??(K.deferred=[]);for(let ee of X._zod.deferred)ee();return X}return Object.defineProperty(B,"init",{value:T}),Object.defineProperty(B,Symbol.hasInstance,{value:(Z)=>{if(E?.Parent&&Z instanceof E.Parent)return!0;return Z?._zod?.traits?.has(g)}}),Object.defineProperty(B,"name",{value:g}),B}var hce=Symbol("zod_brand");class rs extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}var Vf={};function Ri(g){if(g)Object.assign(Vf,g);return Vf}function ow(g){let _=Object.values(g).filter((T)=>typeof T==="number");return Object.entries(g).filter(([T,R])=>_.indexOf(+T)===-1).map(([T,R])=>R)}function iw(g,_){if(typeof _==="bigint")return _.toString();return _}function Yf(g){return{get value(){{let E=g();return Object.defineProperty(this,"value",{value:E}),E}throw Error("cached value already set")}}}function Wf(g){return g===null||g===void 0}function Kf(g){let _=g.startsWith("^")?1:0,E=g.endsWith("$")?g.length-1:g.length;return g.slice(_,E)}function sw(g,_){let E=(g.toString().split(".")[1]||"").length,T=(_.toString().split(".")[1]||"").length,R=E>T?E:T,w=Number.parseInt(g.toFixed(R).replace(".","")),B=Number.parseInt(_.toFixed(R).replace(".",""));return w%B/10**R}function Cn(g,_,E){Object.defineProperty(g,_,{get(){{let R=E();return g[_]=R,R}throw Error("cached value already set")},set(R){Object.defineProperty(g,_,{value:R})},configurable:!0})}function $S(g,_,E){Object.defineProperty(g,_,{value:E,writable:!0,enumerable:!0,configurable:!0})}function lu(g){return JSON.stringify(g)}var US=Error.captureStackTrace?Error.captureStackTrace:(...g)=>{};function $d(g){return typeof g==="object"&&g!==null&&!Array.isArray(g)}var aw=Yf(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(g){return!1}});function Jf(g){if($d(g)===!1)return!1;let _=g.constructor;if(_===void 0)return!0;let E=_.prototype;if($d(E)===!1)return!1;if(Object.prototype.hasOwnProperty.call(E,"isPrototypeOf")===!1)return!1;return!0}var uw=new Set(["string","number","symbol"]);function Xs(g){return g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ki(g,_,E){let T=new g._zod.constr(_??g._zod.def);if(!_||E?.parent)T._zod.parent=g;return T}function Ft(g){let _=g;if(!_)return{};if(typeof _==="string")return{error:()=>_};if(_?.message!==void 0){if(_?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");_.error=_.message}if(delete _.message,typeof _.error==="string")return{..._,error:()=>_.error};return _}function cw(g){return Object.keys(g).filter((_)=>g[_]._zod.optin==="optional"&&g[_]._zod.optout==="optional")}var lw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function O5(g,_){let E={},T=g._zod.def;for(let R in _){if(!(R in T.shape))throw Error(`Unrecognized key: "${R}"`);if(!_[R])continue;E[R]=T.shape[R]}return ki(g,{...g._zod.def,shape:E,checks:[]})}function M5(g,_){let E={...g._zod.def.shape},T=g._zod.def;for(let R in _){if(!(R in T.shape))throw Error(`Unrecognized key: "${R}"`);if(!_[R])continue;delete E[R]}return ki(g,{...g._zod.def,shape:E,checks:[]})}function L5(g,_){if(!Jf(_))throw Error("Invalid input to extend: expected a plain object");let E={...g._zod.def,get shape(){let T={...g._zod.def.shape,..._};return $S(this,"shape",T),T},checks:[]};return ki(g,E)}function D5(g,_){return ki(g,{...g._zod.def,get shape(){let E={...g._zod.def.shape,..._._zod.def.shape};return $S(this,"shape",E),E},catchall:_._zod.def.catchall,checks:[]})}function $5(g,_,E){let T=_._zod.def.shape,R={...T};if(E)for(let w in E){if(!(w in T))throw Error(`Unrecognized key: "${w}"`);if(!E[w])continue;R[w]=g?new g({type:"optional",innerType:T[w]}):T[w]}else for(let w in T)R[w]=g?new g({type:"optional",innerType:T[w]}):T[w];return ki(_,{..._._zod.def,shape:R,checks:[]})}function U5(g,_,E){let T=_._zod.def.shape,R={...T};if(E)for(let w in E){if(!(w in R))throw Error(`Unrecognized key: "${w}"`);if(!E[w])continue;R[w]=new g({type:"nonoptional",innerType:T[w]})}else for(let w in T)R[w]=new g({type:"nonoptional",innerType:T[w]});return ki(_,{..._._zod.def,shape:R,checks:[]})}function du(g,_=0){for(let E=_;E<g.issues.length;E++)if(g.issues[E]?.continue!==!0)return!0;return!1}function Ud(g,_){return _.map((E)=>{var T;return(T=E).path??(T.path=[]),E.path.unshift(g),E})}function Gf(g){return typeof g==="string"?g:g?.message}function Ii(g,_,E){let T={...g,path:g.path??[]};if(!g.message){let R=Gf(g.inst?._zod.def?.error?.(g))??Gf(_?.error?.(g))??Gf(E.customError?.(g))??Gf(E.localeError?.(g))??"Invalid input";T.message=R}if(delete T.inst,delete T.continue,!_?.reportInput)delete T.input;return T}function Xf(g){if(Array.isArray(g))return"array";if(typeof g==="string")return"string";return"unknown"}function pu(...g){let[_,E,T]=g;if(typeof _==="string")return{message:_,code:"custom",input:E,inst:T};return{..._}}var dw=(g,_)=>{g.name="$ZodError",Object.defineProperty(g,"_zod",{value:g._zod,enumerable:!1}),Object.defineProperty(g,"issues",{value:_,enumerable:!1}),Object.defineProperty(g,"message",{get(){return JSON.stringify(_,iw,2)},enumerable:!0}),Object.defineProperty(g,"toString",{value:()=>g.message,enumerable:!1})},Qf=He("$ZodError",dw),FS=He("$ZodError",dw,{Parent:Error});function pw(g,_=(E)=>E.message){let E={},T=[];for(let R of g.issues)if(R.path.length>0)E[R.path[0]]=E[R.path[0]]||[],E[R.path[0]].push(_(R));else T.push(_(R));return{formErrors:T,fieldErrors:E}}function mw(g,_){let E=_||function(w){return w.message},T={_errors:[]},R=(w)=>{for(let B of w.issues)if(B.code==="invalid_union"&&B.errors.length)B.errors.map((Z)=>R({issues:Z}));else if(B.code==="invalid_key")R({issues:B.issues});else if(B.code==="invalid_element")R({issues:B.issues});else if(B.path.length===0)T._errors.push(E(B));else{let Z=T,K=0;while(K<B.path.length){let X=B.path[K];if(K!==B.path.length-1)Z[X]=Z[X]||{_errors:[]};else Z[X]=Z[X]||{_errors:[]},Z[X]._errors.push(E(B));Z=Z[X],K++}}};return R(g),T}var fw=(g)=>(_,E,T,R)=>{let w=T?Object.assign(T,{async:!1}):{async:!1},B=_._zod.run({value:E,issues:[]},w);if(B instanceof Promise)throw new rs;if(B.issues.length){let Z=new(R?.Err??g)(B.issues.map((K)=>Ii(K,w,Ri())));throw US(Z,R?.callee),Z}return B.value};var hw=(g)=>async(_,E,T,R)=>{let w=T?Object.assign(T,{async:!0}):{async:!0},B=_._zod.run({value:E,issues:[]},w);if(B instanceof Promise)B=await B;if(B.issues.length){let Z=new(R?.Err??g)(B.issues.map((K)=>Ii(K,w,Ri())));throw US(Z,R?.callee),Z}return B.value};var BS=(g)=>(_,E,T)=>{let R=T?{...T,async:!1}:{async:!1},w=_._zod.run({value:E,issues:[]},R);if(w instanceof Promise)throw new rs;return w.issues.length?{success:!1,error:new(g??Qf)(w.issues.map((B)=>Ii(B,R,Ri())))}:{success:!0,data:w.value}},gw=BS(FS),HS=(g)=>async(_,E,T)=>{let R=T?Object.assign(T,{async:!0}):{async:!0},w=_._zod.run({value:E,issues:[]},R);if(w instanceof Promise)w=await w;return w.issues.length?{success:!1,error:new g(w.issues.map((B)=>Ii(B,R,Ri())))}:{success:!0,data:w.value}},bw=HS(FS);var Sw=/^[cC][^\s-]{8,}$/,_w=/^[0-9a-z]+$/,Ew=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Tw=/^[0-9a-vA-V]{20}$/,yw=/^[A-Za-z0-9]{27}$/,vw=/^[a-zA-Z0-9_-]{21}$/,xw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Rw=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,qS=(g)=>{if(!g)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${g}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var kw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;function Iw(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}var Cw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ww=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,Aw=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Pw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,jS=/^[A-Za-z0-9_-]*$/,Nw=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;var Ow=/^\+(?:[0-9]){6,14}[0-9]$/,Mw="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Lw=new RegExp(`^${Mw}$`);function Dw(g){return typeof g.precision==="number"?g.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":g.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${g.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function $w(g){return new RegExp(`^${Dw(g)}$`)}function Uw(g){let _=Dw({precision:g.precision}),E=["Z"];if(g.local)E.push("");if(g.offset)E.push("([+-]\\d{2}:\\d{2})");let T=`${_}(?:${E.join("|")})`;return new RegExp(`^${Mw}T(?:${T})$`)}var Fw=(g)=>{let _=g?`[\\s\\S]{${g?.minimum??0},${g?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${_}$`)};var Bw=/^\d+$/,Hw=/^-?\d+(?:\.\d+)?/i,qw=/true|false/i;var jw=/^[^A-Z]*$/,Zw=/^[^a-z]*$/;var yr=He("$ZodCheck",(g,_)=>{var E;g._zod??(g._zod={}),g._zod.def=_,(E=g._zod).onattach??(E.onattach=[])}),Vw={number:"number",bigint:"bigint",object:"date"},VS=He("$ZodCheckLessThan",(g,_)=>{yr.init(g,_);let E=Vw[typeof _.value];g._zod.onattach.push((T)=>{let R=T._zod.bag,w=(_.inclusive?R.maximum:R.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(_.value<w)if(_.inclusive)R.maximum=_.value;else R.exclusiveMaximum=_.value}),g._zod.check=(T)=>{if(_.inclusive?T.value<=_.value:T.value<_.value)return;T.issues.push({origin:E,code:"too_big",maximum:_.value,input:T.value,inclusive:_.inclusive,inst:g,continue:!_.abort})}}),GS=He("$ZodCheckGreaterThan",(g,_)=>{yr.init(g,_);let E=Vw[typeof _.value];g._zod.onattach.push((T)=>{let R=T._zod.bag,w=(_.inclusive?R.minimum:R.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(_.value>w)if(_.inclusive)R.minimum=_.value;else R.exclusiveMinimum=_.value}),g._zod.check=(T)=>{if(_.inclusive?T.value>=_.value:T.value>_.value)return;T.issues.push({origin:E,code:"too_small",minimum:_.value,input:T.value,inclusive:_.inclusive,inst:g,continue:!_.abort})}}),Gw=He("$ZodCheckMultipleOf",(g,_)=>{yr.init(g,_),g._zod.onattach.push((E)=>{var T;(T=E._zod.bag).multipleOf??(T.multipleOf=_.value)}),g._zod.check=(E)=>{if(typeof E.value!==typeof _.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof E.value==="bigint"?E.value%_.value===BigInt(0):sw(E.value,_.value)===0)return;E.issues.push({origin:typeof E.value,code:"not_multiple_of",divisor:_.value,input:E.value,inst:g,continue:!_.abort})}}),Yw=He("$ZodCheckNumberFormat",(g,_)=>{yr.init(g,_),_.format=_.format||"float64";let E=_.format?.includes("int"),T=E?"int":"number",[R,w]=lw[_.format];g._zod.onattach.push((B)=>{let Z=B._zod.bag;if(Z.format=_.format,Z.minimum=R,Z.maximum=w,E)Z.pattern=Bw}),g._zod.check=(B)=>{let Z=B.value;if(E){if(!Number.isInteger(Z)){B.issues.push({expected:T,format:_.format,code:"invalid_type",input:Z,inst:g});return}if(!Number.isSafeInteger(Z)){if(Z>0)B.issues.push({input:Z,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:g,origin:T,continue:!_.abort});else B.issues.push({input:Z,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:g,origin:T,continue:!_.abort});return}}if(Z<R)B.issues.push({origin:"number",input:Z,code:"too_small",minimum:R,inclusive:!0,inst:g,continue:!_.abort});if(Z>w)B.issues.push({origin:"number",input:Z,code:"too_big",maximum:w,inst:g})}});var Ww=He("$ZodCheckMaxLength",(g,_)=>{var E;yr.init(g,_),(E=g._zod.def).when??(E.when=(T)=>{let R=T.value;return!Wf(R)&&R.length!==void 0}),g._zod.onattach.push((T)=>{let R=T._zod.bag.maximum??Number.POSITIVE_INFINITY;if(_.maximum<R)T._zod.bag.maximum=_.maximum}),g._zod.check=(T)=>{let R=T.value;if(R.length<=_.maximum)return;let B=Xf(R);T.issues.push({origin:B,code:"too_big",maximum:_.maximum,inclusive:!0,input:R,inst:g,continue:!_.abort})}}),Kw=He("$ZodCheckMinLength",(g,_)=>{var E;yr.init(g,_),(E=g._zod.def).when??(E.when=(T)=>{let R=T.value;return!Wf(R)&&R.length!==void 0}),g._zod.onattach.push((T)=>{let R=T._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(_.minimum>R)T._zod.bag.minimum=_.minimum}),g._zod.check=(T)=>{let R=T.value;if(R.length>=_.minimum)return;let B=Xf(R);T.issues.push({origin:B,code:"too_small",minimum:_.minimum,inclusive:!0,input:R,inst:g,continue:!_.abort})}}),Jw=He("$ZodCheckLengthEquals",(g,_)=>{var E;yr.init(g,_),(E=g._zod.def).when??(E.when=(T)=>{let R=T.value;return!Wf(R)&&R.length!==void 0}),g._zod.onattach.push((T)=>{let R=T._zod.bag;R.minimum=_.length,R.maximum=_.length,R.length=_.length}),g._zod.check=(T)=>{let R=T.value,w=R.length;if(w===_.length)return;let B=Xf(R),Z=w>_.length;T.issues.push({origin:B,...Z?{code:"too_big",maximum:_.length}:{code:"too_small",minimum:_.length},inclusive:!0,exact:!0,input:T.value,inst:g,continue:!_.abort})}}),Fd=He("$ZodCheckStringFormat",(g,_)=>{var E,T;if(yr.init(g,_),g._zod.onattach.push((R)=>{let w=R._zod.bag;if(w.format=_.format,_.pattern)w.patterns??(w.patterns=new Set),w.patterns.add(_.pattern)}),_.pattern)(E=g._zod).check??(E.check=(R)=>{if(_.pattern.lastIndex=0,_.pattern.test(R.value))return;R.issues.push({origin:"string",code:"invalid_format",format:_.format,input:R.value,..._.pattern?{pattern:_.pattern.toString()}:{},inst:g,continue:!_.abort})});else(T=g._zod).check??(T.check=()=>{})}),Xw=He("$ZodCheckRegex",(g,_)=>{Fd.init(g,_),g._zod.check=(E)=>{if(_.pattern.lastIndex=0,_.pattern.test(E.value))return;E.issues.push({origin:"string",code:"invalid_format",format:"regex",input:E.value,pattern:_.pattern.toString(),inst:g,continue:!_.abort})}}),Qw=He("$ZodCheckLowerCase",(g,_)=>{_.pattern??(_.pattern=jw),Fd.init(g,_)}),eA=He("$ZodCheckUpperCase",(g,_)=>{_.pattern??(_.pattern=Zw),Fd.init(g,_)}),tA=He("$ZodCheckIncludes",(g,_)=>{yr.init(g,_);let E=Xs(_.includes),T=new RegExp(typeof _.position==="number"?`^.{${_.position}}${E}`:E);_.pattern=T,g._zod.onattach.push((R)=>{let w=R._zod.bag;w.patterns??(w.patterns=new Set),w.patterns.add(T)}),g._zod.check=(R)=>{if(R.value.includes(_.includes,_.position))return;R.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:_.includes,input:R.value,inst:g,continue:!_.abort})}}),nA=He("$ZodCheckStartsWith",(g,_)=>{yr.init(g,_);let E=new RegExp(`^${Xs(_.prefix)}.*`);_.pattern??(_.pattern=E),g._zod.onattach.push((T)=>{let R=T._zod.bag;R.patterns??(R.patterns=new Set),R.patterns.add(E)}),g._zod.check=(T)=>{if(T.value.startsWith(_.prefix))return;T.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:_.prefix,input:T.value,inst:g,continue:!_.abort})}}),rA=He("$ZodCheckEndsWith",(g,_)=>{yr.init(g,_);let E=new RegExp(`.*${Xs(_.suffix)}$`);_.pattern??(_.pattern=E),g._zod.onattach.push((T)=>{let R=T._zod.bag;R.patterns??(R.patterns=new Set),R.patterns.add(E)}),g._zod.check=(T)=>{if(T.value.endsWith(_.suffix))return;T.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:_.suffix,input:T.value,inst:g,continue:!_.abort})}});var oA=He("$ZodCheckOverwrite",(g,_)=>{yr.init(g,_),g._zod.check=(E)=>{E.value=_.tx(E.value)}});class YS{constructor(g=[]){if(this.content=[],this.indent=0,this)this.args=g}indented(g){this.indent+=1,g(this),this.indent-=1}write(g){if(typeof g==="function"){g(this,{execution:"sync"}),g(this,{execution:"async"});return}let E=g.split(`
|
|
131
|
+
`).filter((w)=>w),T=Math.min(...E.map((w)=>w.length-w.trimStart().length)),R=E.map((w)=>w.slice(T)).map((w)=>" ".repeat(this.indent*2)+w);for(let w of R)this.content.push(w)}compile(){let g=Function,_=this?.args,T=[...(this?.content??[""]).map((R)=>` ${R}`)];return new g(..._,T.join(`
|
|
132
|
+
`))}}var sA={major:4,minor:0,patch:0};var An=He("$ZodType",(g,_)=>{var E;g??(g={}),g._zod.def=_,g._zod.bag=g._zod.bag||{},g._zod.version=sA;let T=[...g._zod.def.checks??[]];if(g._zod.traits.has("$ZodCheck"))T.unshift(g);for(let R of T)for(let w of R._zod.onattach)w(g);if(T.length===0)(E=g._zod).deferred??(E.deferred=[]),g._zod.deferred?.push(()=>{g._zod.run=g._zod.parse});else{let R=(w,B,Z)=>{let K=du(w),X;for(let ee of B){if(ee._zod.def.when){if(!ee._zod.def.when(w))continue}else if(K)continue;let re=w.issues.length,ie=ee._zod.check(w);if(ie instanceof Promise&&Z?.async===!1)throw new rs;if(X||ie instanceof Promise)X=(X??Promise.resolve()).then(async()=>{if(await ie,w.issues.length===re)return;if(!K)K=du(w,re)});else{if(w.issues.length===re)continue;if(!K)K=du(w,re)}}if(X)return X.then(()=>w);return w};g._zod.run=(w,B)=>{let Z=g._zod.parse(w,B);if(Z instanceof Promise){if(B.async===!1)throw new rs;return Z.then((K)=>R(K,T,B))}return R(Z,T,B)}}g["~standard"]={validate:(R)=>{try{let w=gw(g,R);return w.success?{value:w.data}:{issues:w.error?.issues}}catch(w){return bw(g,R).then((B)=>B.success?{value:B.data}:{issues:B.error?.issues})}},vendor:"zod",version:1}}),th=He("$ZodString",(g,_)=>{An.init(g,_),g._zod.pattern=[...g?._zod.bag?.patterns??[]].pop()??Fw(g._zod.bag),g._zod.parse=(E,T)=>{if(_.coerce)try{E.value=String(E.value)}catch(R){}if(typeof E.value==="string")return E;return E.issues.push({expected:"string",code:"invalid_type",input:E.value,inst:g}),E}}),Pn=He("$ZodStringFormat",(g,_)=>{Fd.init(g,_),th.init(g,_)}),gA=He("$ZodGUID",(g,_)=>{_.pattern??(_.pattern=Rw),Pn.init(g,_)}),bA=He("$ZodUUID",(g,_)=>{if(_.version){let T={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[_.version];if(T===void 0)throw Error(`Invalid UUID version: "${_.version}"`);_.pattern??(_.pattern=qS(T))}else _.pattern??(_.pattern=qS());Pn.init(g,_)}),SA=He("$ZodEmail",(g,_)=>{_.pattern??(_.pattern=kw),Pn.init(g,_)}),_A=He("$ZodURL",(g,_)=>{Pn.init(g,_),g._zod.check=(E)=>{try{let T=E.value,R=new URL(T),w=R.href;if(_.hostname){if(_.hostname.lastIndex=0,!_.hostname.test(R.hostname))E.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Nw.source,input:E.value,inst:g,continue:!_.abort})}if(_.protocol){if(_.protocol.lastIndex=0,!_.protocol.test(R.protocol.endsWith(":")?R.protocol.slice(0,-1):R.protocol))E.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:_.protocol.source,input:E.value,inst:g,continue:!_.abort})}if(!T.endsWith("/")&&w.endsWith("/"))E.value=w.slice(0,-1);else E.value=w;return}catch(T){E.issues.push({code:"invalid_format",format:"url",input:E.value,inst:g,continue:!_.abort})}}}),EA=He("$ZodEmoji",(g,_)=>{_.pattern??(_.pattern=Iw()),Pn.init(g,_)}),TA=He("$ZodNanoID",(g,_)=>{_.pattern??(_.pattern=vw),Pn.init(g,_)}),yA=He("$ZodCUID",(g,_)=>{_.pattern??(_.pattern=Sw),Pn.init(g,_)}),vA=He("$ZodCUID2",(g,_)=>{_.pattern??(_.pattern=_w),Pn.init(g,_)}),xA=He("$ZodULID",(g,_)=>{_.pattern??(_.pattern=Ew),Pn.init(g,_)}),RA=He("$ZodXID",(g,_)=>{_.pattern??(_.pattern=Tw),Pn.init(g,_)}),kA=He("$ZodKSUID",(g,_)=>{_.pattern??(_.pattern=yw),Pn.init(g,_)}),IA=He("$ZodISODateTime",(g,_)=>{_.pattern??(_.pattern=Uw(_)),Pn.init(g,_)}),CA=He("$ZodISODate",(g,_)=>{_.pattern??(_.pattern=Lw),Pn.init(g,_)}),wA=He("$ZodISOTime",(g,_)=>{_.pattern??(_.pattern=$w(_)),Pn.init(g,_)}),AA=He("$ZodISODuration",(g,_)=>{_.pattern??(_.pattern=xw),Pn.init(g,_)}),PA=He("$ZodIPv4",(g,_)=>{_.pattern??(_.pattern=Cw),Pn.init(g,_),g._zod.onattach.push((E)=>{let T=E._zod.bag;T.format="ipv4"})}),zA=He("$ZodIPv6",(g,_)=>{_.pattern??(_.pattern=ww),Pn.init(g,_),g._zod.onattach.push((E)=>{let T=E._zod.bag;T.format="ipv6"}),g._zod.check=(E)=>{try{new URL(`http://[${E.value}]`)}catch{E.issues.push({code:"invalid_format",format:"ipv6",input:E.value,inst:g,continue:!_.abort})}}}),NA=He("$ZodCIDRv4",(g,_)=>{_.pattern??(_.pattern=Aw),Pn.init(g,_)}),OA=He("$ZodCIDRv6",(g,_)=>{_.pattern??(_.pattern=Pw),Pn.init(g,_),g._zod.check=(E)=>{let[T,R]=E.value.split("/");try{if(!R)throw Error();let w=Number(R);if(`${w}`!==R)throw Error();if(w<0||w>128)throw Error();new URL(`http://[${T}]`)}catch{E.issues.push({code:"invalid_format",format:"cidrv6",input:E.value,inst:g,continue:!_.abort})}}});function MA(g){if(g==="")return!0;if(g.length%4!==0)return!1;try{return atob(g),!0}catch{return!1}}var LA=He("$ZodBase64",(g,_)=>{_.pattern??(_.pattern=zw),Pn.init(g,_),g._zod.onattach.push((E)=>{E._zod.bag.contentEncoding="base64"}),g._zod.check=(E)=>{if(MA(E.value))return;E.issues.push({code:"invalid_format",format:"base64",input:E.value,inst:g,continue:!_.abort})}});function B5(g){if(!jS.test(g))return!1;let _=g.replace(/[-_]/g,(T)=>T==="-"?"+":"/"),E=_.padEnd(Math.ceil(_.length/4)*4,"=");return MA(E)}var DA=He("$ZodBase64URL",(g,_)=>{_.pattern??(_.pattern=jS),Pn.init(g,_),g._zod.onattach.push((E)=>{E._zod.bag.contentEncoding="base64url"}),g._zod.check=(E)=>{if(B5(E.value))return;E.issues.push({code:"invalid_format",format:"base64url",input:E.value,inst:g,continue:!_.abort})}}),$A=He("$ZodE164",(g,_)=>{_.pattern??(_.pattern=Ow),Pn.init(g,_)});function H5(g,_=null){try{let E=g.split(".");if(E.length!==3)return!1;let[T]=E;if(!T)return!1;let R=JSON.parse(atob(T));if("typ"in R&&R?.typ!=="JWT")return!1;if(!R.alg)return!1;if(_&&(!("alg"in R)||R.alg!==_))return!1;return!0}catch{return!1}}var UA=He("$ZodJWT",(g,_)=>{Pn.init(g,_),g._zod.check=(E)=>{if(H5(E.value,_.alg))return;E.issues.push({code:"invalid_format",format:"jwt",input:E.value,inst:g,continue:!_.abort})}});var KS=He("$ZodNumber",(g,_)=>{An.init(g,_),g._zod.pattern=g._zod.bag.pattern??Hw,g._zod.parse=(E,T)=>{if(_.coerce)try{E.value=Number(E.value)}catch(B){}let R=E.value;if(typeof R==="number"&&!Number.isNaN(R)&&Number.isFinite(R))return E;let w=typeof R==="number"?Number.isNaN(R)?"NaN":!Number.isFinite(R)?"Infinity":void 0:void 0;return E.issues.push({expected:"number",code:"invalid_type",input:R,inst:g,...w?{received:w}:{}}),E}}),FA=He("$ZodNumber",(g,_)=>{Yw.init(g,_),KS.init(g,_)}),BA=He("$ZodBoolean",(g,_)=>{An.init(g,_),g._zod.pattern=qw,g._zod.parse=(E,T)=>{if(_.coerce)try{E.value=Boolean(E.value)}catch(w){}let R=E.value;if(typeof R==="boolean")return E;return E.issues.push({expected:"boolean",code:"invalid_type",input:R,inst:g}),E}});var HA=He("$ZodAny",(g,_)=>{An.init(g,_),g._zod.parse=(E)=>E}),qA=He("$ZodUnknown",(g,_)=>{An.init(g,_),g._zod.parse=(E)=>E}),jA=He("$ZodNever",(g,_)=>{An.init(g,_),g._zod.parse=(E,T)=>(E.issues.push({expected:"never",code:"invalid_type",input:E.value,inst:g}),E)});function aA(g,_,E){if(g.issues.length)_.issues.push(...Ud(E,g.issues));_.value[E]=g.value}var ZA=He("$ZodArray",(g,_)=>{An.init(g,_),g._zod.parse=(E,T)=>{let R=E.value;if(!Array.isArray(R))return E.issues.push({expected:"array",code:"invalid_type",input:R,inst:g}),E;E.value=Array(R.length);let w=[];for(let B=0;B<R.length;B++){let Z=R[B],K=_.element._zod.run({value:Z,issues:[]},T);if(K instanceof Promise)w.push(K.then((X)=>aA(X,E,B)));else aA(K,E,B)}if(w.length)return Promise.all(w).then(()=>E);return E}});function eh(g,_,E){if(g.issues.length)_.issues.push(...Ud(E,g.issues));_.value[E]=g.value}function uA(g,_,E,T){if(g.issues.length)if(T[E]===void 0)if(E in T)_.value[E]=void 0;else _.value[E]=g.value;else _.issues.push(...Ud(E,g.issues));else if(g.value===void 0){if(E in T)_.value[E]=void 0}else _.value[E]=g.value}var VA=He("$ZodObject",(g,_)=>{An.init(g,_);let E=Yf(()=>{let re=Object.keys(_.shape);for(let se of re)if(!(_.shape[se]instanceof An))throw Error(`Invalid element at key "${se}": expected a Zod schema`);let ie=cw(_.shape);return{shape:_.shape,keys:re,keySet:new Set(re),numKeys:re.length,optionalKeys:new Set(ie)}});Cn(g._zod,"propValues",()=>{let re=_.shape,ie={};for(let se in re){let ae=re[se]._zod;if(ae.values){ie[se]??(ie[se]=new Set);for(let fe of ae.values)ie[se].add(fe)}}return ie});let T=(re)=>{let ie=new YS(["shape","payload","ctx"]),se=E.value,ae=(Ae)=>{let Re=lu(Ae);return`shape[${Re}]._zod.run({ value: input[${Re}], issues: [] }, ctx)`};ie.write("const input = payload.value;");let fe=Object.create(null),xe=0;for(let Ae of se.keys)fe[Ae]=`key_${xe++}`;ie.write("const newResult = {}");for(let Ae of se.keys)if(se.optionalKeys.has(Ae)){let Re=fe[Ae];ie.write(`const ${Re} = ${ae(Ae)};`);let Ve=lu(Ae);ie.write(`
|
|
133
|
+
if (${Re}.issues.length) {
|
|
134
|
+
if (input[${Ve}] === undefined) {
|
|
135
|
+
if (${Ve} in input) {
|
|
136
|
+
newResult[${Ve}] = undefined;
|
|
137
|
+
}
|
|
138
|
+
} else {
|
|
139
|
+
payload.issues = payload.issues.concat(
|
|
140
|
+
${Re}.issues.map((iss) => ({
|
|
141
|
+
...iss,
|
|
142
|
+
path: iss.path ? [${Ve}, ...iss.path] : [${Ve}],
|
|
143
|
+
}))
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
} else if (${Re}.value === undefined) {
|
|
147
|
+
if (${Ve} in input) newResult[${Ve}] = undefined;
|
|
148
|
+
} else {
|
|
149
|
+
newResult[${Ve}] = ${Re}.value;
|
|
150
|
+
}
|
|
151
|
+
`)}else{let Re=fe[Ae];ie.write(`const ${Re} = ${ae(Ae)};`),ie.write(`
|
|
152
|
+
if (${Re}.issues.length) payload.issues = payload.issues.concat(${Re}.issues.map(iss => ({
|
|
153
|
+
...iss,
|
|
154
|
+
path: iss.path ? [${lu(Ae)}, ...iss.path] : [${lu(Ae)}]
|
|
155
|
+
})));`),ie.write(`newResult[${lu(Ae)}] = ${Re}.value`)}ie.write("payload.value = newResult;"),ie.write("return payload;");let Ee=ie.compile();return(Ae,Re)=>Ee(re,Ae,Re)},R,w=$d,B=!Vf.jitless,K=B&&aw.value,X=_.catchall,ee;g._zod.parse=(re,ie)=>{ee??(ee=E.value);let se=re.value;if(!w(se))return re.issues.push({expected:"object",code:"invalid_type",input:se,inst:g}),re;let ae=[];if(B&&K&&ie?.async===!1&&ie.jitless!==!0){if(!R)R=T(_.shape);re=R(re,ie)}else{re.value={};let Re=ee.shape;for(let Ve of ee.keys){let Ge=Re[Ve],ke=Ge._zod.run({value:se[Ve],issues:[]},ie),qe=Ge._zod.optin==="optional"&&Ge._zod.optout==="optional";if(ke instanceof Promise)ae.push(ke.then((pt)=>qe?uA(pt,re,Ve,se):eh(pt,re,Ve)));else if(qe)uA(ke,re,Ve,se);else eh(ke,re,Ve)}}if(!X)return ae.length?Promise.all(ae).then(()=>re):re;let fe=[],xe=ee.keySet,Ee=X._zod,Ae=Ee.def.type;for(let Re of Object.keys(se)){if(xe.has(Re))continue;if(Ae==="never"){fe.push(Re);continue}let Ve=Ee.run({value:se[Re],issues:[]},ie);if(Ve instanceof Promise)ae.push(Ve.then((Ge)=>eh(Ge,re,Re)));else eh(Ve,re,Re)}if(fe.length)re.issues.push({code:"unrecognized_keys",keys:fe,input:se,inst:g});if(!ae.length)return re;return Promise.all(ae).then(()=>re)}});function cA(g,_,E,T){for(let R of g)if(R.issues.length===0)return _.value=R.value,_;return _.issues.push({code:"invalid_union",input:_.value,inst:E,errors:g.map((R)=>R.issues.map((w)=>Ii(w,T,Ri())))}),_}var JS=He("$ZodUnion",(g,_)=>{An.init(g,_),Cn(g._zod,"optin",()=>_.options.some((E)=>E._zod.optin==="optional")?"optional":void 0),Cn(g._zod,"optout",()=>_.options.some((E)=>E._zod.optout==="optional")?"optional":void 0),Cn(g._zod,"values",()=>{if(_.options.every((E)=>E._zod.values))return new Set(_.options.flatMap((E)=>Array.from(E._zod.values)));return}),Cn(g._zod,"pattern",()=>{if(_.options.every((E)=>E._zod.pattern)){let E=_.options.map((T)=>T._zod.pattern);return new RegExp(`^(${E.map((T)=>Kf(T.source)).join("|")})$`)}return}),g._zod.parse=(E,T)=>{let R=!1,w=[];for(let B of _.options){let Z=B._zod.run({value:E.value,issues:[]},T);if(Z instanceof Promise)w.push(Z),R=!0;else{if(Z.issues.length===0)return Z;w.push(Z)}}if(!R)return cA(w,E,g,T);return Promise.all(w).then((B)=>cA(B,E,g,T))}}),GA=He("$ZodDiscriminatedUnion",(g,_)=>{JS.init(g,_);let E=g._zod.parse;Cn(g._zod,"propValues",()=>{let R={};for(let w of _.options){let B=w._zod.propValues;if(!B||Object.keys(B).length===0)throw Error(`Invalid discriminated union option at index "${_.options.indexOf(w)}"`);for(let[Z,K]of Object.entries(B)){if(!R[Z])R[Z]=new Set;for(let X of K)R[Z].add(X)}}return R});let T=Yf(()=>{let R=_.options,w=new Map;for(let B of R){let Z=B._zod.propValues[_.discriminator];if(!Z||Z.size===0)throw Error(`Invalid discriminated union option at index "${_.options.indexOf(B)}"`);for(let K of Z){if(w.has(K))throw Error(`Duplicate discriminator value "${String(K)}"`);w.set(K,B)}}return w});g._zod.parse=(R,w)=>{let B=R.value;if(!$d(B))return R.issues.push({code:"invalid_type",expected:"object",input:B,inst:g}),R;let Z=T.value.get(B?.[_.discriminator]);if(Z)return Z._zod.run(R,w);if(_.unionFallback)return E(R,w);return R.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:B,path:[_.discriminator],inst:g}),R}}),YA=He("$ZodIntersection",(g,_)=>{An.init(g,_),g._zod.parse=(E,T)=>{let R=E.value,w=_.left._zod.run({value:R,issues:[]},T),B=_.right._zod.run({value:R,issues:[]},T);if(w instanceof Promise||B instanceof Promise)return Promise.all([w,B]).then(([K,X])=>lA(E,K,X));return lA(E,w,B)}});function WS(g,_){if(g===_)return{valid:!0,data:g};if(g instanceof Date&&_ instanceof Date&&+g===+_)return{valid:!0,data:g};if(Jf(g)&&Jf(_)){let E=Object.keys(_),T=Object.keys(g).filter((w)=>E.indexOf(w)!==-1),R={...g,..._};for(let w of T){let B=WS(g[w],_[w]);if(!B.valid)return{valid:!1,mergeErrorPath:[w,...B.mergeErrorPath]};R[w]=B.data}return{valid:!0,data:R}}if(Array.isArray(g)&&Array.isArray(_)){if(g.length!==_.length)return{valid:!1,mergeErrorPath:[]};let E=[];for(let T=0;T<g.length;T++){let R=g[T],w=_[T],B=WS(R,w);if(!B.valid)return{valid:!1,mergeErrorPath:[T,...B.mergeErrorPath]};E.push(B.data)}return{valid:!0,data:E}}return{valid:!1,mergeErrorPath:[]}}function lA(g,_,E){if(_.issues.length)g.issues.push(..._.issues);if(E.issues.length)g.issues.push(...E.issues);if(du(g))return g;let T=WS(_.value,E.value);if(!T.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(T.mergeErrorPath)}`);return g.value=T.data,g}var WA=He("$ZodEnum",(g,_)=>{An.init(g,_);let E=ow(_.entries);g._zod.values=new Set(E),g._zod.pattern=new RegExp(`^(${E.filter((T)=>uw.has(typeof T)).map((T)=>typeof T==="string"?Xs(T):T.toString()).join("|")})$`),g._zod.parse=(T,R)=>{let w=T.value;if(g._zod.values.has(w))return T;return T.issues.push({code:"invalid_value",values:E,input:w,inst:g}),T}}),KA=He("$ZodLiteral",(g,_)=>{An.init(g,_),g._zod.values=new Set(_.values),g._zod.pattern=new RegExp(`^(${_.values.map((E)=>typeof E==="string"?Xs(E):E?E.toString():String(E)).join("|")})$`),g._zod.parse=(E,T)=>{let R=E.value;if(g._zod.values.has(R))return E;return E.issues.push({code:"invalid_value",values:_.values,input:R,inst:g}),E}});var JA=He("$ZodTransform",(g,_)=>{An.init(g,_),g._zod.parse=(E,T)=>{let R=_.transform(E.value,E);if(T.async)return(R instanceof Promise?R:Promise.resolve(R)).then((B)=>(E.value=B,E));if(R instanceof Promise)throw new rs;return E.value=R,E}}),XA=He("$ZodOptional",(g,_)=>{An.init(g,_),g._zod.optin="optional",g._zod.optout="optional",Cn(g._zod,"values",()=>_.innerType._zod.values?new Set([..._.innerType._zod.values,void 0]):void 0),Cn(g._zod,"pattern",()=>{let E=_.innerType._zod.pattern;return E?new RegExp(`^(${Kf(E.source)})?$`):void 0}),g._zod.parse=(E,T)=>{if(_.innerType._zod.optin==="optional")return _.innerType._zod.run(E,T);if(E.value===void 0)return E;return _.innerType._zod.run(E,T)}}),QA=He("$ZodNullable",(g,_)=>{An.init(g,_),Cn(g._zod,"optin",()=>_.innerType._zod.optin),Cn(g._zod,"optout",()=>_.innerType._zod.optout),Cn(g._zod,"pattern",()=>{let E=_.innerType._zod.pattern;return E?new RegExp(`^(${Kf(E.source)}|null)$`):void 0}),Cn(g._zod,"values",()=>_.innerType._zod.values?new Set([..._.innerType._zod.values,null]):void 0),g._zod.parse=(E,T)=>{if(E.value===null)return E;return _.innerType._zod.run(E,T)}}),eP=He("$ZodDefault",(g,_)=>{An.init(g,_),g._zod.optin="optional",Cn(g._zod,"values",()=>_.innerType._zod.values),g._zod.parse=(E,T)=>{if(E.value===void 0)return E.value=_.defaultValue,E;let R=_.innerType._zod.run(E,T);if(R instanceof Promise)return R.then((w)=>dA(w,_));return dA(R,_)}});function dA(g,_){if(g.value===void 0)g.value=_.defaultValue;return g}var tP=He("$ZodPrefault",(g,_)=>{An.init(g,_),g._zod.optin="optional",Cn(g._zod,"values",()=>_.innerType._zod.values),g._zod.parse=(E,T)=>{if(E.value===void 0)E.value=_.defaultValue;return _.innerType._zod.run(E,T)}}),nP=He("$ZodNonOptional",(g,_)=>{An.init(g,_),Cn(g._zod,"values",()=>{let E=_.innerType._zod.values;return E?new Set([...E].filter((T)=>T!==void 0)):void 0}),g._zod.parse=(E,T)=>{let R=_.innerType._zod.run(E,T);if(R instanceof Promise)return R.then((w)=>pA(w,g));return pA(R,g)}});function pA(g,_){if(!g.issues.length&&g.value===void 0)g.issues.push({code:"invalid_type",expected:"nonoptional",input:g.value,inst:_});return g}var rP=He("$ZodCatch",(g,_)=>{An.init(g,_),g._zod.optin="optional",Cn(g._zod,"optout",()=>_.innerType._zod.optout),Cn(g._zod,"values",()=>_.innerType._zod.values),g._zod.parse=(E,T)=>{let R=_.innerType._zod.run(E,T);if(R instanceof Promise)return R.then((w)=>{if(E.value=w.value,w.issues.length)E.value=_.catchValue({...E,error:{issues:w.issues.map((B)=>Ii(B,T,Ri()))},input:E.value}),E.issues=[];return E});if(E.value=R.value,R.issues.length)E.value=_.catchValue({...E,error:{issues:R.issues.map((w)=>Ii(w,T,Ri()))},input:E.value}),E.issues=[];return E}});var oP=He("$ZodPipe",(g,_)=>{An.init(g,_),Cn(g._zod,"values",()=>_.in._zod.values),Cn(g._zod,"optin",()=>_.in._zod.optin),Cn(g._zod,"optout",()=>_.out._zod.optout),g._zod.parse=(E,T)=>{let R=_.in._zod.run(E,T);if(R instanceof Promise)return R.then((w)=>mA(w,_,T));return mA(R,_,T)}});function mA(g,_,E){if(du(g))return g;return _.out._zod.run({value:g.value,issues:g.issues},E)}var iP=He("$ZodReadonly",(g,_)=>{An.init(g,_),Cn(g._zod,"propValues",()=>_.innerType._zod.propValues),Cn(g._zod,"values",()=>_.innerType._zod.values),Cn(g._zod,"optin",()=>_.innerType._zod.optin),Cn(g._zod,"optout",()=>_.innerType._zod.optout),g._zod.parse=(E,T)=>{let R=_.innerType._zod.run(E,T);if(R instanceof Promise)return R.then(fA);return fA(R)}});function fA(g){return g.value=Object.freeze(g.value),g}var sP=He("$ZodCustom",(g,_)=>{yr.init(g,_),An.init(g,_),g._zod.parse=(E,T)=>E,g._zod.check=(E)=>{let T=E.value,R=_.fn(T);if(R instanceof Promise)return R.then((w)=>hA(w,E,T,g));hA(R,E,T,g);return}});function hA(g,_,E,T){if(!g){let R={code:"custom",input:E,inst:T,path:[...T._zod.def.path??[]],continue:!T._zod.def.abort};if(T._zod.def.params)R.params=T._zod.def.params;_.issues.push(pu(R))}}var zce=Symbol("ZodOutput"),Nce=Symbol("ZodInput");class aP{constructor(){this._map=new Map,this._idmap=new Map}add(g,..._){let E=_[0];if(this._map.set(g,E),E&&typeof E==="object"&&"id"in E){if(this._idmap.has(E.id))throw Error(`ID ${E.id} already exists in the registry`);this._idmap.set(E.id,g)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(g){let _=this._map.get(g);if(_&&typeof _==="object"&&"id"in _)this._idmap.delete(_.id);return this._map.delete(g),this}get(g){let _=g._zod.parent;if(_){let E={...this.get(_)??{}};return delete E.id,{...E,...this._map.get(g)}}return this._map.get(g)}has(g){return this._map.has(g)}}function q5(){return new aP}var Bd=q5();function uP(g,_){return new g({type:"string",...Ft(_)})}function cP(g,_){return new g({type:"string",format:"email",check:"string_format",abort:!1,...Ft(_)})}function XS(g,_){return new g({type:"string",format:"guid",check:"string_format",abort:!1,...Ft(_)})}function lP(g,_){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,...Ft(_)})}function dP(g,_){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ft(_)})}function pP(g,_){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ft(_)})}function mP(g,_){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ft(_)})}function fP(g,_){return new g({type:"string",format:"url",check:"string_format",abort:!1,...Ft(_)})}function hP(g,_){return new g({type:"string",format:"emoji",check:"string_format",abort:!1,...Ft(_)})}function gP(g,_){return new g({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ft(_)})}function bP(g,_){return new g({type:"string",format:"cuid",check:"string_format",abort:!1,...Ft(_)})}function SP(g,_){return new g({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ft(_)})}function _P(g,_){return new g({type:"string",format:"ulid",check:"string_format",abort:!1,...Ft(_)})}function EP(g,_){return new g({type:"string",format:"xid",check:"string_format",abort:!1,...Ft(_)})}function TP(g,_){return new g({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ft(_)})}function yP(g,_){return new g({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ft(_)})}function vP(g,_){return new g({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ft(_)})}function xP(g,_){return new g({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ft(_)})}function RP(g,_){return new g({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ft(_)})}function kP(g,_){return new g({type:"string",format:"base64",check:"string_format",abort:!1,...Ft(_)})}function IP(g,_){return new g({type:"string",format:"base64url",check:"string_format",abort:!1,...Ft(_)})}function CP(g,_){return new g({type:"string",format:"e164",check:"string_format",abort:!1,...Ft(_)})}function wP(g,_){return new g({type:"string",format:"jwt",check:"string_format",abort:!1,...Ft(_)})}function AP(g,_){return new g({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ft(_)})}function PP(g,_){return new g({type:"string",format:"date",check:"string_format",...Ft(_)})}function zP(g,_){return new g({type:"string",format:"time",check:"string_format",precision:null,...Ft(_)})}function NP(g,_){return new g({type:"string",format:"duration",check:"string_format",...Ft(_)})}function OP(g,_){return new g({type:"number",check:"number_format",abort:!1,format:"safeint",...Ft(_)})}function MP(g,_){return new g({type:"boolean",...Ft(_)})}function LP(g){return new g({type:"any"})}function DP(g){return new g({type:"unknown"})}function $P(g,_){return new g({type:"never",...Ft(_)})}function nh(g,_){return new VS({check:"less_than",...Ft(_),value:g,inclusive:!1})}function Hd(g,_){return new VS({check:"less_than",...Ft(_),value:g,inclusive:!0})}function rh(g,_){return new GS({check:"greater_than",...Ft(_),value:g,inclusive:!1})}function qd(g,_){return new GS({check:"greater_than",...Ft(_),value:g,inclusive:!0})}function oh(g,_){return new Gw({check:"multiple_of",...Ft(_),value:g})}function ih(g,_){return new Ww({check:"max_length",...Ft(_),maximum:g})}function mu(g,_){return new Kw({check:"min_length",...Ft(_),minimum:g})}function sh(g,_){return new Jw({check:"length_equals",...Ft(_),length:g})}function QS(g,_){return new Xw({check:"string_format",format:"regex",...Ft(_),pattern:g})}function e_(g){return new Qw({check:"string_format",format:"lowercase",...Ft(g)})}function t_(g){return new eA({check:"string_format",format:"uppercase",...Ft(g)})}function n_(g,_){return new tA({check:"string_format",format:"includes",...Ft(_),includes:g})}function r_(g,_){return new nA({check:"string_format",format:"starts_with",...Ft(_),prefix:g})}function o_(g,_){return new rA({check:"string_format",format:"ends_with",...Ft(_),suffix:g})}function ea(g){return new oA({check:"overwrite",tx:g})}function i_(g){return ea((_)=>_.normalize(g))}function s_(){return ea((g)=>g.trim())}function a_(){return ea((g)=>g.toLowerCase())}function u_(){return ea((g)=>g.toUpperCase())}function UP(g,_,E){return new g({type:"array",element:_,...Ft(E)})}function FP(g,_,E){let T=Ft(E);return T.abort??(T.abort=!0),new g({type:"custom",check:"custom",fn:_,...T})}function BP(g,_,E){return new g({type:"custom",check:"custom",fn:_,...Ft(E)})}var W5=He("ZodISODateTime",(g,_)=>{IA.init(g,_),Nn.init(g,_)});function HP(g){return AP(W5,g)}var K5=He("ZodISODate",(g,_)=>{CA.init(g,_),Nn.init(g,_)});function qP(g){return PP(K5,g)}var J5=He("ZodISOTime",(g,_)=>{wA.init(g,_),Nn.init(g,_)});function jP(g){return zP(J5,g)}var X5=He("ZodISODuration",(g,_)=>{AA.init(g,_),Nn.init(g,_)});function ZP(g){return NP(X5,g)}var VP=(g,_)=>{Qf.init(g,_),g.name="ZodError",Object.defineProperties(g,{format:{value:(E)=>mw(g,E)},flatten:{value:(E)=>pw(g,E)},addIssue:{value:(E)=>g.issues.push(E)},addIssues:{value:(E)=>g.issues.push(...E)},isEmpty:{get(){return g.issues.length===0}}})},ale=He("ZodError",VP),jd=He("ZodError",VP,{Parent:Error});var GP=fw(jd),YP=hw(jd),WP=BS(jd),KP=HS(jd);var Hn=He("ZodType",(g,_)=>(An.init(g,_),g.def=_,Object.defineProperty(g,"_def",{value:_}),g.check=(...E)=>g.clone({..._,checks:[..._.checks??[],...E.map((T)=>typeof T==="function"?{_zod:{check:T,def:{check:"custom"},onattach:[]}}:T)]}),g.clone=(E,T)=>ki(g,E,T),g.brand=()=>g,g.register=(E,T)=>(E.add(g,T),g),g.parse=(E,T)=>GP(g,E,T,{callee:g.parse}),g.safeParse=(E,T)=>WP(g,E,T),g.parseAsync=async(E,T)=>YP(g,E,T,{callee:g.parseAsync}),g.safeParseAsync=async(E,T)=>KP(g,E,T),g.spa=g.safeParseAsync,g.refine=(E,T)=>g.check(G8(E,T)),g.superRefine=(E)=>g.check(Y8(E)),g.overwrite=(E)=>g.check(ea(E)),g.optional=()=>XP(g),g.nullable=()=>QP(g),g.nullish=()=>XP(QP(g)),g.nonoptional=(E)=>F8(g,E),g.array=()=>Wn(g),g.or=(E)=>ch([g,E]),g.and=(E)=>P8(g,E),g.transform=(E)=>e2(g,O8(E)),g.default=(E)=>D8(g,E),g.prefault=(E)=>U8(g,E),g.catch=(E)=>H8(g,E),g.pipe=(E)=>e2(g,E),g.readonly=()=>Z8(g),g.describe=(E)=>{let T=g.clone();return Bd.add(T,{description:E}),T},Object.defineProperty(g,"description",{get(){return Bd.get(g)?.description},configurable:!0}),g.meta=(...E)=>{if(E.length===0)return Bd.get(g);let T=g.clone();return Bd.add(T,E[0]),T},g.isOptional=()=>g.safeParse(void 0).success,g.isNullable=()=>g.safeParse(null).success,g)),t2=He("_ZodString",(g,_)=>{th.init(g,_),Hn.init(g,_);let E=g._zod.bag;g.format=E.format??null,g.minLength=E.minimum??null,g.maxLength=E.maximum??null,g.regex=(...T)=>g.check(QS(...T)),g.includes=(...T)=>g.check(n_(...T)),g.startsWith=(...T)=>g.check(r_(...T)),g.endsWith=(...T)=>g.check(o_(...T)),g.min=(...T)=>g.check(mu(...T)),g.max=(...T)=>g.check(ih(...T)),g.length=(...T)=>g.check(sh(...T)),g.nonempty=(...T)=>g.check(mu(1,...T)),g.lowercase=(T)=>g.check(e_(T)),g.uppercase=(T)=>g.check(t_(T)),g.trim=()=>g.check(s_()),g.normalize=(...T)=>g.check(i_(...T)),g.toLowerCase=()=>g.check(a_()),g.toUpperCase=()=>g.check(u_())}),n8=He("ZodString",(g,_)=>{th.init(g,_),t2.init(g,_),g.email=(E)=>g.check(cP(r8,E)),g.url=(E)=>g.check(fP(o8,E)),g.jwt=(E)=>g.check(wP(_8,E)),g.emoji=(E)=>g.check(hP(i8,E)),g.guid=(E)=>g.check(XS(JP,E)),g.uuid=(E)=>g.check(lP(uh,E)),g.uuidv4=(E)=>g.check(dP(uh,E)),g.uuidv6=(E)=>g.check(pP(uh,E)),g.uuidv7=(E)=>g.check(mP(uh,E)),g.nanoid=(E)=>g.check(gP(s8,E)),g.guid=(E)=>g.check(XS(JP,E)),g.cuid=(E)=>g.check(bP(a8,E)),g.cuid2=(E)=>g.check(SP(u8,E)),g.ulid=(E)=>g.check(_P(c8,E)),g.base64=(E)=>g.check(kP(g8,E)),g.base64url=(E)=>g.check(IP(b8,E)),g.xid=(E)=>g.check(EP(l8,E)),g.ksuid=(E)=>g.check(TP(d8,E)),g.ipv4=(E)=>g.check(yP(p8,E)),g.ipv6=(E)=>g.check(vP(m8,E)),g.cidrv4=(E)=>g.check(xP(f8,E)),g.cidrv6=(E)=>g.check(RP(h8,E)),g.e164=(E)=>g.check(CP(S8,E)),g.datetime=(E)=>g.check(HP(E)),g.date=(E)=>g.check(qP(E)),g.time=(E)=>g.check(jP(E)),g.duration=(E)=>g.check(ZP(E))});function Fe(g){return uP(n8,g)}var Nn=He("ZodStringFormat",(g,_)=>{Pn.init(g,_),t2.init(g,_)}),r8=He("ZodEmail",(g,_)=>{SA.init(g,_),Nn.init(g,_)});var JP=He("ZodGUID",(g,_)=>{gA.init(g,_),Nn.init(g,_)});var uh=He("ZodUUID",(g,_)=>{bA.init(g,_),Nn.init(g,_)});var o8=He("ZodURL",(g,_)=>{_A.init(g,_),Nn.init(g,_)});var i8=He("ZodEmoji",(g,_)=>{EA.init(g,_),Nn.init(g,_)});var s8=He("ZodNanoID",(g,_)=>{TA.init(g,_),Nn.init(g,_)});var a8=He("ZodCUID",(g,_)=>{yA.init(g,_),Nn.init(g,_)});var u8=He("ZodCUID2",(g,_)=>{vA.init(g,_),Nn.init(g,_)});var c8=He("ZodULID",(g,_)=>{xA.init(g,_),Nn.init(g,_)});var l8=He("ZodXID",(g,_)=>{RA.init(g,_),Nn.init(g,_)});var d8=He("ZodKSUID",(g,_)=>{kA.init(g,_),Nn.init(g,_)});var p8=He("ZodIPv4",(g,_)=>{PA.init(g,_),Nn.init(g,_)});var m8=He("ZodIPv6",(g,_)=>{zA.init(g,_),Nn.init(g,_)});var f8=He("ZodCIDRv4",(g,_)=>{NA.init(g,_),Nn.init(g,_)});var h8=He("ZodCIDRv6",(g,_)=>{OA.init(g,_),Nn.init(g,_)});var g8=He("ZodBase64",(g,_)=>{LA.init(g,_),Nn.init(g,_)});var b8=He("ZodBase64URL",(g,_)=>{DA.init(g,_),Nn.init(g,_)});var S8=He("ZodE164",(g,_)=>{$A.init(g,_),Nn.init(g,_)});var _8=He("ZodJWT",(g,_)=>{UA.init(g,_),Nn.init(g,_)});var E8=He("ZodNumber",(g,_)=>{KS.init(g,_),Hn.init(g,_),g.gt=(T,R)=>g.check(rh(T,R)),g.gte=(T,R)=>g.check(qd(T,R)),g.min=(T,R)=>g.check(qd(T,R)),g.lt=(T,R)=>g.check(nh(T,R)),g.lte=(T,R)=>g.check(Hd(T,R)),g.max=(T,R)=>g.check(Hd(T,R)),g.int=(T)=>g.check(rn(T)),g.safe=(T)=>g.check(rn(T)),g.positive=(T)=>g.check(rh(0,T)),g.nonnegative=(T)=>g.check(qd(0,T)),g.negative=(T)=>g.check(nh(0,T)),g.nonpositive=(T)=>g.check(Hd(0,T)),g.multipleOf=(T,R)=>g.check(oh(T,R)),g.step=(T,R)=>g.check(oh(T,R)),g.finite=()=>g;let E=g._zod.bag;g.minValue=Math.max(E.minimum??Number.NEGATIVE_INFINITY,E.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,g.maxValue=Math.min(E.maximum??Number.POSITIVE_INFINITY,E.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,g.isInt=(E.format??"").includes("int")||Number.isSafeInteger(E.multipleOf??0.5),g.isFinite=!0,g.format=E.format??null});var T8=He("ZodNumberFormat",(g,_)=>{FA.init(g,_),E8.init(g,_)});function rn(g){return OP(T8,g)}var y8=He("ZodBoolean",(g,_)=>{BA.init(g,_),Hn.init(g,_)});function hn(g){return MP(y8,g)}var v8=He("ZodAny",(g,_)=>{HA.init(g,_),Hn.init(g,_)});function Jt(){return LP(v8)}var x8=He("ZodUnknown",(g,_)=>{qA.init(g,_),Hn.init(g,_)});function c_(){return DP(x8)}var R8=He("ZodNever",(g,_)=>{jA.init(g,_),Hn.init(g,_)});function k8(g){return $P(R8,g)}var I8=He("ZodArray",(g,_)=>{ZA.init(g,_),Hn.init(g,_),g.element=_.element,g.min=(E,T)=>g.check(mu(E,T)),g.nonempty=(E)=>g.check(mu(1,E)),g.max=(E,T)=>g.check(ih(E,T)),g.length=(E,T)=>g.check(sh(E,T)),g.unwrap=()=>g.element});function Wn(g,_){return UP(I8,g,_)}var C8=He("ZodObject",(g,_)=>{VA.init(g,_),Hn.init(g,_),Cn(g,"shape",()=>_.shape),g.keyof=()=>fu(Object.keys(g._zod.def.shape)),g.catchall=(E)=>g.clone({...g._zod.def,catchall:E}),g.passthrough=()=>g.clone({...g._zod.def,catchall:c_()}),g.loose=()=>g.clone({...g._zod.def,catchall:c_()}),g.strict=()=>g.clone({...g._zod.def,catchall:k8()}),g.strip=()=>g.clone({...g._zod.def,catchall:void 0}),g.extend=(E)=>L5(g,E),g.merge=(E)=>D5(g,E),g.pick=(E)=>O5(g,E),g.omit=(E)=>M5(g,E),g.partial=(...E)=>$5(r2,g,E[0]),g.required=(...E)=>U5(o2,g,E[0])});function St(g,_){return new C8({type:"object",get shape(){return $S(this,"shape",{...g}),this.shape},catchall:c_(),...Ft(_)})}var n2=He("ZodUnion",(g,_)=>{JS.init(g,_),Hn.init(g,_),g.options=_.options});function ch(g,_){return new n2({type:"union",options:g,...Ft(_)})}var w8=He("ZodDiscriminatedUnion",(g,_)=>{n2.init(g,_),GA.init(g,_)});function ta(g,_,E){return new w8({type:"union",options:_,discriminator:g,...Ft(E)})}var A8=He("ZodIntersection",(g,_)=>{YA.init(g,_),Hn.init(g,_)});function P8(g,_){return new A8({type:"intersection",left:g,right:_})}var l_=He("ZodEnum",(g,_)=>{WA.init(g,_),Hn.init(g,_),g.enum=_.entries,g.options=Object.values(_.entries);let E=new Set(Object.keys(_.entries));g.extract=(T,R)=>{let w={};for(let B of T)if(E.has(B))w[B]=_.entries[B];else throw Error(`Key ${B} not found in enum`);return new l_({..._,checks:[],...Ft(R),entries:w})},g.exclude=(T,R)=>{let w={..._.entries};for(let B of T)if(E.has(B))delete w[B];else throw Error(`Key ${B} not found in enum`);return new l_({..._,checks:[],...Ft(R),entries:w})}});function fu(g,_){let E=Array.isArray(g)?Object.fromEntries(g.map((T)=>[T,T])):g;return new l_({type:"enum",entries:E,...Ft(_)})}var z8=He("ZodLiteral",(g,_)=>{KA.init(g,_),Hn.init(g,_),g.values=new Set(_.values),Object.defineProperty(g,"value",{get(){if(_.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return _.values[0]}})});function Dt(g,_){return new z8({type:"literal",values:Array.isArray(g)?g:[g],...Ft(_)})}var N8=He("ZodTransform",(g,_)=>{JA.init(g,_),Hn.init(g,_),g._zod.parse=(E,T)=>{E.addIssue=(w)=>{if(typeof w==="string")E.issues.push(pu(w,E.value,_));else{let B=w;if(B.fatal)B.continue=!1;B.code??(B.code="custom"),B.input??(B.input=E.value),B.inst??(B.inst=g),B.continue??(B.continue=!0),E.issues.push(pu(B))}};let R=_.transform(E.value,E);if(R instanceof Promise)return R.then((w)=>(E.value=w,E));return E.value=R,E}});function O8(g){return new N8({type:"transform",transform:g})}var r2=He("ZodOptional",(g,_)=>{XA.init(g,_),Hn.init(g,_),g.unwrap=()=>g._zod.def.innerType});function XP(g){return new r2({type:"optional",innerType:g})}var M8=He("ZodNullable",(g,_)=>{QA.init(g,_),Hn.init(g,_),g.unwrap=()=>g._zod.def.innerType});function QP(g){return new M8({type:"nullable",innerType:g})}var L8=He("ZodDefault",(g,_)=>{eP.init(g,_),Hn.init(g,_),g.unwrap=()=>g._zod.def.innerType,g.removeDefault=g.unwrap});function D8(g,_){return new L8({type:"default",innerType:g,get defaultValue(){return typeof _==="function"?_():_}})}var $8=He("ZodPrefault",(g,_)=>{tP.init(g,_),Hn.init(g,_),g.unwrap=()=>g._zod.def.innerType});function U8(g,_){return new $8({type:"prefault",innerType:g,get defaultValue(){return typeof _==="function"?_():_}})}var o2=He("ZodNonOptional",(g,_)=>{nP.init(g,_),Hn.init(g,_),g.unwrap=()=>g._zod.def.innerType});function F8(g,_){return new o2({type:"nonoptional",innerType:g,...Ft(_)})}var B8=He("ZodCatch",(g,_)=>{rP.init(g,_),Hn.init(g,_),g.unwrap=()=>g._zod.def.innerType,g.removeCatch=g.unwrap});function H8(g,_){return new B8({type:"catch",innerType:g,catchValue:typeof _==="function"?_:()=>_})}var q8=He("ZodPipe",(g,_)=>{oP.init(g,_),Hn.init(g,_),g.in=_.in,g.out=_.out});function e2(g,_){return new q8({type:"pipe",in:g,out:_})}var j8=He("ZodReadonly",(g,_)=>{iP.init(g,_),Hn.init(g,_)});function Z8(g){return new j8({type:"readonly",innerType:g})}var i2=He("ZodCustom",(g,_)=>{sP.init(g,_),Hn.init(g,_)});function V8(g){let _=new yr({check:"custom"});return _._zod.check=g,_}function Zd(g,_){return FP(i2,g??(()=>!0),_)}function G8(g,_={}){return BP(i2,g,_)}function Y8(g){let _=V8((E)=>(E.addIssue=(T)=>{if(typeof T==="string")E.issues.push(pu(T,E.value,_._zod.def));else{let R=T;if(R.fatal)R.continue=!1;R.code??(R.code="custom"),R.input??(R.input=E.value),R.inst??(R.inst=_),R.continue??(R.continue=!_._zod.def.abort),E.issues.push(pu(R))}},g(E.value,E)));return _}var K8=fu(fn),en=Zd((g)=>typeof g==="object"&&g!==null&&!Array.isArray(g)),pn=Fe(),s2=fu(["developer","system","assistant","user"]),J8=St({type:Dt(fn.TEXT_MESSAGE_START),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),messageId:Fe(),role:s2.optional(),name:Fe().optional()}),X8=St({type:Dt(fn.TEXT_MESSAGE_CONTENT),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),messageId:Fe(),delta:Fe()}),Q8=St({type:Dt(fn.TEXT_MESSAGE_END),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),messageId:Fe()}),eB=St({type:Dt(fn.TEXT_MESSAGE_CHUNK),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),messageId:Fe().optional(),role:s2.optional(),delta:Fe().optional(),name:Fe().optional()}),tB=St({type:Dt(fn.TOOL_CALL_START),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),toolCallId:Fe(),toolCallName:Fe(),parentMessageId:Fe().optional()}),nB=St({type:Dt(fn.TOOL_CALL_ARGS),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),toolCallId:Fe(),delta:Fe()}),rB=St({type:Dt(fn.TOOL_CALL_END),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),toolCallId:Fe()}),oB=St({type:Dt(fn.TOOL_CALL_CHUNK),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),toolCallId:Fe().optional(),toolCallName:Fe().optional(),parentMessageId:Fe().optional(),delta:Fe().optional()}),iB=St({type:Dt("text"),id:Fe().optional(),text:Fe(),metadata:Jt().refine((g)=>g!==null).optional()}),sB=St({type:Dt("data"),value:Fe(),mimeType:Fe()}),aB=St({type:Dt("url"),value:Fe(),mimeType:Fe().optional()}),uB=St({type:Dt("file"),value:Fe(),provider:Fe().optional(),mimeType:Fe().optional()}),lh=ta("type",[sB,aB,uB]),cB=St({type:Dt("image"),id:Fe().optional(),source:lh,metadata:Jt().refine((g)=>g!==null).optional()}),lB=St({type:Dt("audio"),id:Fe().optional(),source:lh,metadata:Jt().refine((g)=>g!==null).optional()}),dB=St({type:Dt("video"),id:Fe().optional(),source:lh,metadata:Jt().refine((g)=>g!==null).optional()}),pB=St({type:Dt("document"),id:Fe().optional(),source:lh,metadata:Jt().refine((g)=>g!==null).optional()}),d_=ta("type",[iB,cB,lB,dB,pB]),mB=St({type:Dt(fn.TOOL_CALL_RESULT),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),messageId:Fe(),toolCallId:Fe(),content:ch([Fe(),Wn(d_)]),role:Dt("tool").optional()}),a2=Jt(),fB=St({type:Dt(fn.STATE_SNAPSHOT),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),snapshot:a2.refine((g)=>g!==void 0)}),os=Fe().regex(new RegExp("^(/([^/~]|~[01])*)*$")),hB=St({op:Dt("add"),path:os,value:Jt().refine((g)=>g!==void 0)}).meta({specOpen:!0}),gB=St({op:Dt("remove"),path:os}).meta({specOpen:!0}),bB=St({op:Dt("replace"),path:os,value:Jt().refine((g)=>g!==void 0)}).meta({specOpen:!0}),SB=St({op:Dt("move"),from:os,path:os}).meta({specOpen:!0}),_B=St({op:Dt("copy"),from:os,path:os}).meta({specOpen:!0}),EB=St({op:Dt("test"),path:os,value:Jt().refine((g)=>g!==void 0)}).meta({specOpen:!0}),TB=ta("op",[hB,gB,bB,SB,_B,EB]),u2=Wn(TB),yB=St({type:Dt(fn.STATE_DELTA),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),delta:u2}),vB=St({subagentRunId:pn.optional(),id:Fe(),role:Dt("developer"),name:Fe().optional(),encryptedValue:Fe().optional(),metadata:en.optional(),content:Fe()}),xB=St({subagentRunId:pn.optional(),id:Fe(),role:Dt("system"),name:Fe().optional(),encryptedValue:Fe().optional(),metadata:en.optional(),content:Fe()}),RB=St({name:Fe(),arguments:Fe()}),kB=St({id:Fe(),type:Dt("function"),function:RB,encryptedValue:Fe().optional(),metadata:en.optional()}),IB=St({subagentRunId:pn.optional(),id:Fe(),role:Dt("assistant"),name:Fe().optional(),encryptedValue:Fe().optional(),metadata:en.optional(),content:Fe().optional(),toolCalls:Wn(kB).optional()}),CB=St({subagentRunId:pn.optional(),id:Fe(),role:Dt("user"),name:Fe().optional(),encryptedValue:Fe().optional(),metadata:en.optional(),content:ch([Fe(),Wn(d_)])}),wB=St({subagentRunId:pn.optional(),id:Fe(),role:Dt("tool"),content:ch([Fe(),Wn(d_)]),toolCallId:Fe(),error:Fe().optional(),encryptedValue:Fe().optional(),metadata:en.optional()}),AB=St({subagentRunId:pn.optional(),id:Fe(),role:Dt("activity"),activityType:Fe(),content:Zd((g)=>typeof g==="object"&&g!==null&&!Array.isArray(g)),metadata:en.optional()}),PB=St({subagentRunId:pn.optional(),id:Fe(),role:Dt("reasoning"),content:Fe(),encryptedValue:Fe().optional(),metadata:en.optional()}),c2=ta("role",[vB,xB,IB,CB,wB,AB,PB]),zB=St({type:Dt(fn.MESSAGES_SNAPSHOT),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),messages:Wn(c2)}),NB=St({type:Dt(fn.ACTIVITY_SNAPSHOT),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),messageId:Fe(),activityType:Fe(),content:Zd((g)=>typeof g==="object"&&g!==null&&!Array.isArray(g)),replace:hn().optional()}),OB=St({type:Dt(fn.ACTIVITY_DELTA),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),messageId:Fe(),activityType:Fe(),patch:u2}),MB=St({type:Dt(fn.RAW),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),event:Jt().refine((g)=>g!==void 0),source:Fe().optional()}),LB=St({type:Dt(fn.CUSTOM),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),name:Fe(),value:Jt().refine((g)=>g!==void 0)}),l2=St({name:Fe(),description:Fe(),parameters:Jt().refine((g)=>g!==null).optional(),metadata:en.optional()}),DB=St({description:Fe(),value:Fe()}),$B=St({interruptId:Fe(),status:fu(["resolved","cancelled"]),payload:Jt().refine((g)=>g!==null).optional(),metadata:en.optional()}),UB=St({threadId:Fe(),runId:Fe(),protocolVersion:Fe().optional(),parentRunId:Fe().optional(),state:a2.refine((g)=>g!==null).nullable().transform((g)=>g??void 0).optional(),messages:Wn(c2),tools:Wn(l2).default(()=>[]),context:Wn(DB).default(()=>[]),forwardedProps:Jt().refine((g)=>g!==null).optional(),resume:Wn($B).optional()}),FB=St({type:Dt(fn.RUN_STARTED),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),threadId:Fe(),runId:Fe(),protocolVersion:Fe().optional(),parentRunId:Fe().optional(),input:UB.optional()}),BB=St({type:Dt("success"),pendingToolCallIds:Wn(Fe()).optional()}),HB=St({subagentRunId:pn.optional(),id:Fe(),reason:Fe(),message:Fe().optional(),toolCallId:Fe().optional(),responseSchema:Zd((g)=>typeof g==="object"&&g!==null&&!Array.isArray(g)).optional(),expiresAt:Fe().optional(),metadata:en.optional()}),qB=St({type:Dt("interrupt"),interrupts:Wn(HB).min(1)}),jB=St({type:Dt("cancelled")}),ZB=ta("type",[BB,qB,jB]),d2=St({provider:Fe().optional(),model:Fe().optional(),inputTokens:rn().min(0).max(9007199254740991).optional(),outputTokens:rn().min(0).max(9007199254740991).optional(),totalTokens:rn().min(0).max(9007199254740991).optional(),reasoningTokens:rn().min(0).max(9007199254740991).optional(),cachedInputTokens:rn().min(0).max(9007199254740991).optional(),cacheWriteInputTokens:rn().min(0).max(9007199254740991).optional()}),VB=St({type:Dt(fn.RUN_FINISHED),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),threadId:Fe(),runId:Fe(),result:Jt().refine((g)=>g!==null).optional(),outcome:ZB.optional(),usage:Wn(d2).optional()}),GB=St({type:Dt(fn.RUN_ERROR),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),message:Fe(),code:Fe().optional(),usage:Wn(d2).optional()}),YB=St({type:Dt(fn.STEP_STARTED),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),stepName:Fe()}),WB=St({type:Dt(fn.STEP_FINISHED),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),stepName:Fe()}),KB=St({type:Dt(fn.REASONING_START),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),messageId:Fe()}),JB=St({type:Dt(fn.REASONING_MESSAGE_START),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),messageId:Fe(),role:Dt("reasoning")}),XB=St({type:Dt(fn.REASONING_MESSAGE_CONTENT),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),messageId:Fe(),delta:Fe()}),QB=St({type:Dt(fn.REASONING_MESSAGE_END),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),messageId:Fe()}),eH=St({type:Dt(fn.REASONING_MESSAGE_CHUNK),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),messageId:Fe().optional(),delta:Fe().optional()}),tH=St({type:Dt(fn.REASONING_END),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),messageId:Fe()}),nH=fu(["tool-call","message"]),rH=St({type:Dt(fn.REASONING_ENCRYPTED_VALUE),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn.optional(),subtype:nH,entityId:Fe(),encryptedValue:Fe()}),oH=St({type:Dt(fn.SUBAGENT_STARTED),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn,name:Fe(),description:Fe().optional(),parentSubagentRunId:pn.optional(),parentToolCallId:Fe().optional(),parentMessageId:Fe().optional()}),iH=St({type:Dt("success")}),sH=St({type:Dt("suspended"),interruptIds:Wn(Fe()).optional()}),aH=ta("type",[iH,sH]),uH=St({type:Dt(fn.SUBAGENT_FINISHED),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn,result:Jt().refine((g)=>g!==null).optional(),outcome:aH.optional()}),cH=St({type:Dt(fn.SUBAGENT_ERROR),timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional(),subagentRunId:pn,message:Fe(),code:Fe().optional()}),lH=ta("type",[J8,X8,Q8,eB,tB,nB,rB,oB,mB,fB,yB,zB,NB,OB,MB,LB,FB,VB,GB,YB,WB,KB,JB,XB,QB,eH,tH,rH,oH,uH,cH]),Kle=fu(["developer","system","assistant","user","tool","activity","reasoning"]),dH=St({name:Fe(),description:Fe().optional()}),pH=St({name:Fe().optional(),type:Fe().optional(),description:Fe().optional(),version:Fe().optional(),provider:Fe().optional(),documentationUrl:Fe().optional(),metadata:en.optional()}),mH=St({streaming:hn().optional(),websocket:hn().optional(),httpBinary:hn().optional(),pushNotifications:hn().optional(),resumable:hn().optional()}),fH=St({supported:hn().optional(),items:Wn(l2).optional(),parallelCalls:hn().optional(),clientProvided:hn().optional()}),hH=St({structuredOutput:hn().optional(),supportedMimeTypes:Wn(Fe()).optional()}),gH=St({snapshots:hn().optional(),deltas:hn().optional(),memory:hn().optional(),persistentState:hn().optional()}),bH=St({supported:hn().optional(),delegation:hn().optional(),handoffs:hn().optional(),subagents:Wn(dH).optional()}),SH=St({supported:hn().optional(),streaming:hn().optional(),encrypted:hn().optional()}),_H=St({image:hn().optional(),audio:hn().optional(),video:hn().optional(),pdf:hn().optional(),file:hn().optional()}),EH=St({image:hn().optional(),audio:hn().optional()}),TH=St({input:_H.optional(),output:EH.optional()}),yH=St({codeExecution:hn().optional(),sandboxed:hn().optional(),maxIterations:rn().min(0).max(9007199254740991).optional(),maxExecutionTime:rn().min(0).max(9007199254740991).optional()}),vH=St({supported:hn().optional(),approvals:hn().optional(),interventions:hn().optional(),feedback:hn().optional(),interrupts:hn().optional(),approveWithEdits:hn().optional()}),Jle=St({identity:pH.optional(),transport:mH.optional(),tools:fH.optional(),output:hH.optional(),state:gH.optional(),multiAgent:bH.optional(),reasoning:SH.optional(),multimodal:TH.optional(),execution:yH.optional(),humanInTheLoop:vH.optional(),custom:Zd((g)=>typeof g==="object"&&g!==null&&!Array.isArray(g)).optional()}),Xle=St({subagentRunId:pn.optional()}),Qle=St({type:K8,timestamp:rn().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:Jt().refine((g)=>g!==null).optional(),metadata:en.optional()}),ede=St({subagentRunId:pn.optional(),id:Fe(),role:Fe(),name:Fe().optional(),encryptedValue:Fe().optional(),metadata:en.optional()}),tde=en.optional();var sde=new Set(Object.values(fn));function dh(g){if(!g||g.trim().length===0)return null;try{let _=JSON.parse(g);if(typeof _==="object"&&_!==null&&!Array.isArray(_))return _;return null}catch{return null}}function kH(g,_){if(_?.error)return!0;if(_?.status==="error")return!0;if(_?.success===!1)return!0;if(typeof _?.exit_code==="number"&&_.exit_code!==0)return!0;let E=g.toLowerCase();return E.startsWith("error:")||E.startsWith("error -")||E.startsWith("failed:")||E.startsWith("toolset error:")}function m2(g){let _=[],E=new Map;for(let T of g)if(T.type==="tool_result")E.set(T.call_id,{name:T.name,text:T.text});for(let T of g)if(T.type==="action"){for(let R of T.content)if(R.type==="text")_.push({kind:"text",text:R.text});else if(R.type==="tool_call"){let w=E.get(R.id),B=dh(R.args),Z=w?dh(w.text):null,K=w?kH(w.text,Z):!1;_.push({kind:"tool",pair:{id:R.id,name:R.name,argsRaw:R.args,args:B,resultRaw:w?.text??null,result:Z,status:w?K?"error":"completed":"running"}})}}return _}class Vd{steps=[];activeText="";activeReasoning="";pendingToolCalls=new Map;toolCallNames=new Map;subagents=new Map;a2uiSurfaces=new Map;isFinished=!1;hasError=!1;errorMessage;push(g){switch(g.type){case zr.RUN_STARTED:{this.isFinished=!1,this.hasError=!1;break}case zr.TEXT_MESSAGE_CONTENT:{let _=g;if(_.delta)this.activeText+=_.delta;break}case zr.TEXT_MESSAGE_END:{if(this.activeText.length>0)this.steps.push({type:"action",content:[{type:"text",text:this.activeText}]}),this.activeText="";break}case zr.REASONING_MESSAGE_CONTENT:{let _=g;if(_.delta)this.activeReasoning+=_.delta;break}case zr.TOOL_CALL_START:{let _=g;this.pendingToolCalls.set(_.toolCallId,{name:_.toolCallName,args:""}),this.toolCallNames.set(_.toolCallId,_.toolCallName);break}case zr.TOOL_CALL_ARGS:{let _=g,E=this.pendingToolCalls.get(_.toolCallId);if(E&&_.delta)E.args+=_.delta;break}case zr.TOOL_CALL_END:{let _=g,E=this.pendingToolCalls.get(_.toolCallId);if(E)this.steps.push({type:"action",content:[{type:"tool_call",id:_.toolCallId,name:E.name,args:E.args}]}),this.pendingToolCalls.delete(_.toolCallId);break}case zr.TOOL_CALL_RESULT:{let _=g,E=typeof _.content==="string"?_.content:JSON.stringify(_.content);this.inspectA2uiOperations(_.content);let T=this.toolCallNames.get(_.toolCallId)||_.metadata?.toolName||"tool";this.steps.push({type:"tool_result",call_id:_.toolCallId,name:T,text:E});break}case zr.SUBAGENT_STARTED:{let _=g;this.subagents.set(_.subagentRunId,{id:_.subagentRunId,name:_.name,status:"running",parentRunId:_.parentSubagentRunId});break}case zr.SUBAGENT_FINISHED:{let _=g,E=this.subagents.get(_.subagentRunId);if(E)E.status="completed";break}case zr.SUBAGENT_ERROR:{let _=g,E=this.subagents.get(_.subagentRunId);if(E)E.status="error",E.error=_.message;break}case zr.RUN_FINISHED:{if(this.activeText.length>0)this.steps.push({type:"action",content:[{type:"text",text:this.activeText}]}),this.activeText="";this.isFinished=!0;break}case zr.RUN_ERROR:{let _=g;this.hasError=!0,this.errorMessage=_.message,this.isFinished=!0;break}default:break}}inspectA2uiOperations(g){if(!g)return;let _=typeof g==="string"?dh(g):g;if(_&&typeof _==="object"&&"a2ui_operations"in _){let E=_.a2ui_operations;if(Array.isArray(E)){for(let T of E)if(T.createSurface&&typeof T.createSurface==="object"){let R=T.createSurface;this.a2uiSurfaces.set(R.surfaceId,{surfaceId:R.surfaceId,catalogId:R.catalogId,components:[],dataModel:{}})}else if(T.updateComponents&&typeof T.updateComponents==="object"){let R=T.updateComponents,w=this.a2uiSurfaces.get(R.surfaceId);if(w)w.components=R.components}else if(T.updateDataModel&&typeof T.updateDataModel==="object"){let R=T.updateDataModel,w=this.a2uiSurfaces.get(R.surfaceId);if(w)w.dataModel=R.value}}}}snapshot(){let g=[...this.steps];if(this.activeText.length>0)g.push({type:"action",content:[{type:"text",text:this.activeText}]});let _=m2(g),E="idle";if(this.hasError)E="error";else if(this.isFinished)E="completed";else if(g.length>0||this.activeReasoning.length>0)E="streaming";return{status:E,items:_,steps:g,reasoning:this.activeReasoning,currentText:this.activeText,error:this.errorMessage,subagents:Array.from(this.subagents.values()),a2uiSurfaces:new Map(this.a2uiSurfaces)}}getState(){return this.snapshot()}}var p_=()=>new Vd().snapshot();function IH({adaptive:g}){let[_,E]=n("Show the Material 3 package inventory."),[T,R]=n(""),[w,B]=n(p_),[Z,K]=n(!1),[X,ee]=n(""),re=o(null);i(()=>()=>re.current?.abort(),[]);async function ie(){if(re.current||!_.trim())return;let ae=new AbortController;re.current=ae;let fe=new Vd;R(_.trim()),B(p_()),ee(""),K(!0);try{let xe=await fetch("/api/ai/stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:_.trim()}),signal:ae.signal});if(!xe.ok||!xe.body)throw Error("The local fixture stream is unavailable.");let Ee=xe.body.getReader(),Ae=new TextDecoder,Re="",Ve=()=>{let Ge=Re.split(/\r?\n\r?\n/);Re=Ge.pop()??"";for(let ke of Ge){let qe=ke.split(/\r?\n/).filter((pt)=>pt.startsWith("data:")).map((pt)=>pt.slice(5).trimStart()).join(`
|
|
156
|
+
`);if(qe)fe.push(JSON.parse(qe))}if(!ae.signal.aborted)B(fe.snapshot())};try{for(let Ge=await Ee.read();!Ge.done;Ge=await Ee.read())Re+=Ae.decode(Ge.value,{stream:!0}),Ve();Re+=Ae.decode(),Ve()}finally{Ee.releaseLock()}}catch(xe){if(!ae.signal.aborted)ee(xe instanceof Error?xe.message:"The fixture stream failed.")}finally{if(re.current===ae)re.current=null,K(!1)}}let se=()=>{re.current?.abort(),re.current=null,K(!1),ee("Stream stopped.")};return e(P,{title:"AI",summary:"Inspect a real AG-UI event stream through the Material 3 transcript, tool-call and composer components.",packages:["@aphrody/m3-ai","@aphrody/ag-ui"],panes:g.panes,aside:t(y,{children:[e("h3",{className:"text-title-medium",children:"Stream state"}),e(z,{children:JSON.stringify({status:w.status,items:w.items.length,subagents:w.subagents,fixture:!0},null,2)})]}),children:e(m,{title:"Local protocol fixture",description:"This app streams its package inventory as labelled AG-UI events.",children:t(y,{className:"flex flex-col gap-4",children:[t("div",{"aria-live":"polite","aria-busy":Z,className:"flex flex-col gap-3",children:[T?e(Zf,{content:T,isUser:!0}):e("p",{className:"text-body-large text-on-surface-variant",children:"Send a draft to inspect the local event fixture."}),w.items.map((ae,fe)=>ae.kind==="tool"?e(w0,{pair:ae.pair,defaultExpanded:!0},ae.pair.id):e(Zf,{content:ae.text,isUser:!1,isStreaming:Z,onCopy:(xe)=>{if(!navigator.clipboard){ee("Clipboard access is unavailable.");return}navigator.clipboard.writeText(xe).then(()=>ee("Message copied."),()=>ee("Clipboard access is unavailable."))}},fe))]}),e(LS,{draft:_,onDraftChange:E,onSend:()=>{ie()},isSending:Z,onStop:se,placeholder:"Draft for the local protocol fixture"}),e("p",{role:"status",className:"text-body-medium text-on-surface-variant",children:X||(Z?"Receiving AG-UI events…":"Ready")}),e(G,{variant:"outlined",onClick:()=>{se(),R(""),B(p_()),ee("")},children:"Reset transcript"})]})})})}export{IH as default};
|