[{"data":1,"prerenderedAt":1318},["ShallowReactive",2],{"msfe-doc:\u002Fcustomization\u002Fimages":3,"msfe-source:recipes\u002Fimage.ts":525,"mdc--xmsndu-key":526},{"id":4,"title":5,"body":6,"description":512,"extension":513,"keywords":514,"locale":519,"meta":520,"navigation":106,"order":110,"path":521,"section":498,"seo":522,"stem":523,"__hash__":524},"docs\u002Fcustomization\u002Fimages.zh-CN.md","图片与外部资源",{"type":7,"value":8,"toc":504},"minimark",[9,13,26,37,41,51,55,66,326,358,364,367,426,435,442,445,463,474,477,484,487,500],[10,11,12],"h2",{"id":12},"源码字段与浏览器资源分开",[14,15,16,17,21,22,25],"p",{},"Markdown 保存可持久资源地址，浏览器可能需要短期签名 URL、Blob 或内部资源接口。",[18,19,20],"code",{},"Image.configure({ resolve })"," 负责把源码目标转换为 ",[18,23,24],{},"{ url, release? }","，不是把凭证写进图片语法。",[14,27,28,29,32,33,36],{},"下面是完整的同源资源接入。它只接受 ",[18,30,31],{},"\u002Fassets\u002F\u003Cid>","，需要应用自行实现 ",[18,34,35],{},"GET \u002Fapi\u002Fassets\u002F:id","，本网站不会向这个演示地址发送请求。",[38,39],"msfe-recipe",{"name":40},"recipes\u002Fimage",[14,42,43,46,47,50],{},[18,44,45],{},"privateImageKit"," 替换了 StarterKit 的 image 项，避免同名重复安装。源码中的 ",[18,48,49],{},"\u002Fassets\u002F"," 相对路径经过 host resolver 变成 Blob URL；资源释放时撤销该 URL。示例限制图片类型与 5 MB 大小，可按真实存储协议调整。",[10,52,54],{"id":53},"粘贴拖入与上传","粘贴、拖入与上传",[14,56,57,58,61,62,65],{},"图片功能自带粘贴与拖入：剪贴板或拖放中只有图片文件时接管，存好后在落点插入 ",[18,59,60],{},"![替代文字](\u003C地址>)","。上传期间落点由源码锚点保持，只读时不处理。图片存到哪里由 ",[18,63,64],{},"upload"," 决定：",[67,68,73],"pre",{"className":69,"code":70,"language":71,"meta":72,"style":72},"language-ts shiki shiki-themes github-light github-light github-dark","import { Image, type ImageUploader } from '@quirekit\u002Fmsfe-image'\n\nconst uploader: ImageUploader = {\n  async upload(file, { source, name, signal }) {\n    const body = new FormData()\n    body.append('file', file, name ?? 'image')\n    const response = await fetch('\u002Fapi\u002Fassets', { method: 'POST', body, signal })\n    if (!response.ok) throw new Error('upload-failed')\n    return (await response.json()).url \u002F\u002F 写入 Markdown 的持久地址\n  },\n}\n\nImage.configure({ upload: uploader })\n","ts","",[18,74,75,101,108,131,167,187,213,243,273,297,303,309,314],{"__ignoreMap":72},[76,77,80,84,88,91,94,97],"span",{"class":78,"line":79},"line",1,[76,81,83],{"class":82},"sDD9d","import",[76,85,87],{"class":86},"sVPnS"," { Image, ",[76,89,90],{"class":82},"type",[76,92,93],{"class":86}," ImageUploader } ",[76,95,96],{"class":82},"from",[76,98,100],{"class":99},"s-HEn"," '@quirekit\u002Fmsfe-image'\n",[76,102,104],{"class":78,"line":103},2,[76,105,107],{"emptyLinePlaceholder":106},true,"\n",[76,109,111,114,118,121,125,128],{"class":78,"line":110},3,[76,112,113],{"class":82},"const",[76,115,117],{"class":116},"sUNQB"," uploader",[76,119,120],{"class":82},":",[76,122,124],{"class":123},"sgQzM"," ImageUploader",[76,126,127],{"class":82}," =",[76,129,130],{"class":86}," {\n",[76,132,134,137,140,143,147,150,153,156,159,161,164],{"class":78,"line":133},4,[76,135,136],{"class":82},"  async",[76,138,139],{"class":123}," upload",[76,141,142],{"class":86},"(",[76,144,146],{"class":145},"sde8i","file",[76,148,149],{"class":86},", { ",[76,151,152],{"class":145},"source",[76,154,155],{"class":86},", ",[76,157,158],{"class":145},"name",[76,160,155],{"class":86},[76,162,163],{"class":145},"signal",[76,165,166],{"class":86}," }) {\n",[76,168,170,173,176,178,181,184],{"class":78,"line":169},5,[76,171,172],{"class":82},"    const",[76,174,175],{"class":116}," body",[76,177,127],{"class":82},[76,179,180],{"class":82}," new",[76,182,183],{"class":123}," FormData",[76,185,186],{"class":86},"()\n",[76,188,190,193,196,198,201,204,207,210],{"class":78,"line":189},6,[76,191,192],{"class":86},"    body.",[76,194,195],{"class":123},"append",[76,197,142],{"class":86},[76,199,200],{"class":99},"'file'",[76,202,203],{"class":86},", file, name ",[76,205,206],{"class":82},"??",[76,208,209],{"class":99}," 'image'",[76,211,212],{"class":86},")\n",[76,214,216,218,221,223,226,229,231,234,237,240],{"class":78,"line":215},7,[76,217,172],{"class":82},[76,219,220],{"class":116}," response",[76,222,127],{"class":82},[76,224,225],{"class":82}," await",[76,227,228],{"class":123}," fetch",[76,230,142],{"class":86},[76,232,233],{"class":99},"'\u002Fapi\u002Fassets'",[76,235,236],{"class":86},", { method: ",[76,238,239],{"class":99},"'POST'",[76,241,242],{"class":86},", body, signal })\n",[76,244,246,249,252,255,258,261,263,266,268,271],{"class":78,"line":245},8,[76,247,248],{"class":82},"    if",[76,250,251],{"class":86}," (",[76,253,254],{"class":82},"!",[76,256,257],{"class":86},"response.ok) ",[76,259,260],{"class":82},"throw",[76,262,180],{"class":82},[76,264,265],{"class":123}," Error",[76,267,142],{"class":86},[76,269,270],{"class":99},"'upload-failed'",[76,272,212],{"class":86},[76,274,276,279,281,284,287,290,293],{"class":78,"line":275},9,[76,277,278],{"class":82},"    return",[76,280,251],{"class":86},[76,282,283],{"class":82},"await",[76,285,286],{"class":86}," response.",[76,288,289],{"class":123},"json",[76,291,292],{"class":86},"()).url ",[76,294,296],{"class":295},"sqmzS","\u002F\u002F 写入 Markdown 的持久地址\n",[76,298,300],{"class":78,"line":299},10,[76,301,302],{"class":86},"  },\n",[76,304,306],{"class":78,"line":305},11,[76,307,308],{"class":86},"}\n",[76,310,312],{"class":78,"line":311},12,[76,313,107],{"emptyLinePlaceholder":106},[76,315,317,320,323],{"class":78,"line":316},13,[76,318,319],{"class":86},"Image.",[76,321,322],{"class":123},"configure",[76,324,325],{"class":86},"({ upload: uploader })\n",[327,328,329,342,352],"ul",{},[330,331,332,333,335,336,338,339,341],"li",{},"提供 ",[18,334,64],{},"：上传完成后写入返回的地址；某张图片失败时不写入它，提示由宿主在 ",[18,337,64],{}," 里给出。",[18,340,152],{}," 区分粘贴、拖入、对话框、Word 导入与 AI 等入口，可用于配额或命名。",[330,343,344,345,347,348,351],{},"省略 ",[18,346,64],{},"：PNG、JPEG、GIF、WebP 内联为 ",[18,349,350],{},"data:"," 地址，文档自包含但会变大；SVG 不内联，需要宿主上传。",[330,353,354,357],{},[18,355,356],{},"upload: false","：不处理粘贴与拖入，交给应用自己的扩展。",[14,359,360,363],{},[18,361,362],{},"resolve"," 是可选的反向查询，导出 Word、PDF 时把存储地址取回为 data URI。",[10,365,366],{"id":366},"插入命令",[67,368,370],{"className":69,"code":369,"language":71,"meta":72,"style":72},"const inserted = editor.commands.insertImage({\n  url: '\u002Fassets\u002Fdiagram_42',\n  alt: '系统结构图',\n  title: '架构评审',\n})\n",[18,371,372,390,401,411,421],{"__ignoreMap":72},[76,373,374,376,379,381,384,387],{"class":78,"line":79},[76,375,113],{"class":82},[76,377,378],{"class":116}," inserted",[76,380,127],{"class":82},[76,382,383],{"class":86}," editor.commands.",[76,385,386],{"class":123},"insertImage",[76,388,389],{"class":86},"({\n",[76,391,392,395,398],{"class":78,"line":103},[76,393,394],{"class":86},"  url: ",[76,396,397],{"class":99},"'\u002Fassets\u002Fdiagram_42'",[76,399,400],{"class":86},",\n",[76,402,403,406,409],{"class":78,"line":110},[76,404,405],{"class":86},"  alt: ",[76,407,408],{"class":99},"'系统结构图'",[76,410,400],{"class":86},[76,412,413,416,419],{"class":78,"line":133},[76,414,415],{"class":86},"  title: ",[76,417,418],{"class":99},"'架构评审'",[76,420,400],{"class":86},[76,422,423],{"class":78,"line":169},[76,424,425],{"class":86},"})\n",[14,427,428,429,434],{},"命令验证字段并编码为 Markdown。自己实现上传入口（如对话框）时，先捕获目标、上传文件、取得持久地址，再执行命令；长时间等待使用 ",[430,431,433],"a",{"href":432},"\u002Fguide\u002Fselection","映射锚点","，取消或换文档后不应插入到新的光标位置。",[14,436,437,438,441],{},"内置 Image 在调用 resolver 之前就校验源码地址；不接受 ",[18,439,440],{},"asset:"," 等自定义协议。使用安全相对路径或 HTTPS 地址作为持久标识。若必须支持新协议，需要自己的字段校验和 codec，不能只换 resolver。",[10,443,444],{"id":444},"更换图片组件",[14,446,447,450,451,454,455,458,459,462],{},[18,448,449],{},"Image.extend({ addNodeView() { return VueNodeViewRenderer(ImageView) } })"," 可以继承字段 codec 和资源协议。组件通过 ",[18,452,453],{},"nodeView.status"," 处理加载、成功、错误，使用 ",[18,456,457],{},"nodeView.resource"," 中的结果，并通过 ",[18,460,461],{},"updateAttributes"," 或受控动作修改源码。",[14,464,465,466,469,470,473],{},"可增加标题表单、错误提示和设计系统操作按钮；不要从 ",[18,467,468],{},".cm-content"," 移出图片范围或直接改 ",[18,471,472],{},"src"," 后声称已保存。组件显示资源改变与 Markdown 字段改变是两件不同的事。",[10,475,476],{"id":476},"链接与外部打开策略",[14,478,479,480,483],{},"链接功能的 ",[18,481,482],{},"Link.configure({ openLink })"," 接管显式用户动作的打开策略；只在应用需要时打开安全链接。投影构建或图片加载不能自动触发外部导航。引用式链接\u002F图片、相对地址和特殊协议需要按实际 codec 支持范围处理，不能把显示成功等同于任意格式都可精确写回。",[10,485,486],{"id":486},"验证",[14,488,489,490,494,495,499],{},"覆盖成功、HTTP 失败、非图片响应、体积超限、迟到响应、删除节点、只读及撤销；粘贴与拖入分别验证配置上传与内联两种情况。确认离开页面后没有遗留 object URL，源码始终保存持久 ID。进一步参见 ",[430,491,493],{"href":492},"\u002Fextensions\u002Fresources","资源生命周期"," 和 ",[430,496,498],{"href":497},"\u002Fcustomization\u002Ftheme","UI 与主题","。",[501,502,503],"style",{},"html pre.shiki code .sDD9d, html code.shiki .sDD9d{--shiki-default:#D73A49;--shiki-light:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVPnS, html code.shiki .sVPnS{--shiki-default:#24292E;--shiki-light:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s-HEn, html code.shiki .s-HEn{--shiki-default:#032F62;--shiki-light:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sUNQB, html code.shiki .sUNQB{--shiki-default:#005CC5;--shiki-light:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sgQzM, html code.shiki .sgQzM{--shiki-default:#6F42C1;--shiki-light:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sde8i, html code.shiki .sde8i{--shiki-default:#E36209;--shiki-light:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sqmzS, html code.shiki .sqmzS{--shiki-default:#6A737D;--shiki-light:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":72,"searchDepth":103,"depth":103,"links":505},[506,507,508,509,510,511],{"id":12,"depth":103,"text":12},{"id":53,"depth":103,"text":54},{"id":366,"depth":103,"text":366},{"id":444,"depth":103,"text":444},{"id":476,"depth":103,"text":476},{"id":486,"depth":103,"text":486},"为私有资源配置解析、释放和插入流程，避免把临时 URL 当持久数据。","md",[515,362,64,516,517,518],"Image","openLink","asset","ObjectURL","zh-CN",{},"\u002Fcustomization\u002Fimages",{"title":5,"description":512},"customization\u002Fimages.zh-CN","8Qi-ZIAdVbLm5WD-WkF0SK8g3FjNHduMdcPBeiVCGGc","import { Image } from \"@quirekit\u002Fmsfe-image\";\nimport { StarterKit } from \"@quirekit\u002Fmsfe-starter-kit\";\n\u002F** A same-origin asset resolver; authentication remains in the host fetch policy. *\u002F\nexport const PrivateImages = Image.configure({\n  \u002F** @param source - Canonical asset reference. @param signal - This image's lifetime. @returns One browser resource lease. *\u002F\n  async resolve(source, signal) {\n    const match = \u002F^\\\u002Fassets\\\u002F([a-zA-Z0-9_-]+)$\u002F.exec(source);\n    if (!match) throw new Error(\"unsupported-asset-reference\");\n    const response = await fetch(`\u002Fapi\u002Fassets\u002F${encodeURIComponent(match[1]!)}`, { signal, credentials: \"same-origin\" });\n    if (!response.ok) throw new Error(`asset-http-${response.status}`);\n    const blob = await response.blob();\n    if (!\u002F^image\\\u002F(png|jpeg|webp|gif)$\u002F.test(blob.type) || blob.size > 5_000_000) throw new Error(\"unsupported-image\");\n    const url = URL.createObjectURL(blob);\n    return { url, release() { URL.revokeObjectURL(url); } };\n  },\n});\n\u002F** Replace the preset's image owner; the host must implement GET \u002Fapi\u002Fassets\u002F:id. *\u002F\nexport const privateImageKit = StarterKit.configure({ image: PrivateImages });\n",{"data":527,"body":528},{},{"type":529,"children":530},"root",[531,1313],{"type":532,"tag":67,"props":533,"children":535},"element",{"className":69,"code":534,"language":71,"meta":72,"style":72},"import { Image } from \"@quirekit\u002Fmsfe-image\";\nimport { StarterKit } from \"@quirekit\u002Fmsfe-starter-kit\";\n\u002F** A same-origin asset resolver; authentication remains in the host fetch policy. *\u002F\nexport const PrivateImages = Image.configure({\n  \u002F** @param source - Canonical asset reference. @param signal - This image's lifetime. @returns One browser resource lease. *\u002F\n  async resolve(source, signal) {\n    const match = \u002F^\\\u002Fassets\\\u002F([a-zA-Z0-9_-]+)$\u002F.exec(source);\n    if (!match) throw new Error(\"unsupported-asset-reference\");\n    const response = await fetch(`\u002Fapi\u002Fassets\u002F${encodeURIComponent(match[1]!)}`, { signal, credentials: \"same-origin\" });\n    if (!response.ok) throw new Error(`asset-http-${response.status}`);\n    const blob = await response.blob();\n    if (!\u002F^image\\\u002F(png|jpeg|webp|gif)$\u002F.test(blob.type) || blob.size > 5_000_000) throw new Error(\"unsupported-image\");\n    const url = URL.createObjectURL(blob);\n    return { url, release() { URL.revokeObjectURL(url); } };\n  },\n});\n\u002F** Replace the preset's image owner; the host must implement GET \u002Fapi\u002Fassets\u002F:id. *\u002F\nexport const privateImageKit = StarterKit.configure({ image: PrivateImages });\n\n",[536],{"type":532,"tag":18,"props":537,"children":538},{"__ignoreMap":72},[539,569,594,603,640,687,721,807,853,942,1004,1038,1175,1210,1252,1260,1269,1278],{"type":532,"tag":76,"props":540,"children":541},{"class":78,"line":79},[542,548,554,558,564],{"type":532,"tag":76,"props":543,"children":545},{"style":544},"--shiki-default:#D73A49;--shiki-light:#D73A49;--shiki-dark:#F97583",[546],{"type":547,"value":83},"text",{"type":532,"tag":76,"props":549,"children":551},{"style":550},"--shiki-default:#24292E;--shiki-light:#24292E;--shiki-dark:#E1E4E8",[552],{"type":547,"value":553}," { Image } ",{"type":532,"tag":76,"props":555,"children":556},{"style":544},[557],{"type":547,"value":96},{"type":532,"tag":76,"props":559,"children":561},{"style":560},"--shiki-default:#032F62;--shiki-light:#032F62;--shiki-dark:#9ECBFF",[562],{"type":547,"value":563}," \"@quirekit\u002Fmsfe-image\"",{"type":532,"tag":76,"props":565,"children":566},{"style":550},[567],{"type":547,"value":568},";\n",{"type":532,"tag":76,"props":570,"children":571},{"class":78,"line":103},[572,576,581,585,590],{"type":532,"tag":76,"props":573,"children":574},{"style":544},[575],{"type":547,"value":83},{"type":532,"tag":76,"props":577,"children":578},{"style":550},[579],{"type":547,"value":580}," { StarterKit } ",{"type":532,"tag":76,"props":582,"children":583},{"style":544},[584],{"type":547,"value":96},{"type":532,"tag":76,"props":586,"children":587},{"style":560},[588],{"type":547,"value":589}," \"@quirekit\u002Fmsfe-starter-kit\"",{"type":532,"tag":76,"props":591,"children":592},{"style":550},[593],{"type":547,"value":568},{"type":532,"tag":76,"props":595,"children":596},{"class":78,"line":110},[597],{"type":532,"tag":76,"props":598,"children":600},{"style":599},"--shiki-default:#6A737D;--shiki-light:#6A737D;--shiki-dark:#6A737D",[601],{"type":547,"value":602},"\u002F** A same-origin asset resolver; authentication remains in the host fetch policy. *\u002F\n",{"type":532,"tag":76,"props":604,"children":605},{"class":78,"line":133},[606,611,616,622,626,631,636],{"type":532,"tag":76,"props":607,"children":608},{"style":544},[609],{"type":547,"value":610},"export",{"type":532,"tag":76,"props":612,"children":613},{"style":544},[614],{"type":547,"value":615}," const",{"type":532,"tag":76,"props":617,"children":619},{"style":618},"--shiki-default:#005CC5;--shiki-light:#005CC5;--shiki-dark:#79B8FF",[620],{"type":547,"value":621}," PrivateImages",{"type":532,"tag":76,"props":623,"children":624},{"style":544},[625],{"type":547,"value":127},{"type":532,"tag":76,"props":627,"children":628},{"style":550},[629],{"type":547,"value":630}," Image.",{"type":532,"tag":76,"props":632,"children":634},{"style":633},"--shiki-default:#6F42C1;--shiki-light:#6F42C1;--shiki-dark:#B392F0",[635],{"type":547,"value":322},{"type":532,"tag":76,"props":637,"children":638},{"style":550},[639],{"type":547,"value":389},{"type":532,"tag":76,"props":641,"children":642},{"class":78,"line":169},[643,648,653,658,663,667,672,677,682],{"type":532,"tag":76,"props":644,"children":645},{"style":599},[646],{"type":547,"value":647},"  \u002F** ",{"type":532,"tag":76,"props":649,"children":650},{"style":544},[651],{"type":547,"value":652},"@param",{"type":532,"tag":76,"props":654,"children":655},{"style":550},[656],{"type":547,"value":657}," source",{"type":532,"tag":76,"props":659,"children":660},{"style":599},[661],{"type":547,"value":662}," - Canonical asset reference. ",{"type":532,"tag":76,"props":664,"children":665},{"style":544},[666],{"type":547,"value":652},{"type":532,"tag":76,"props":668,"children":669},{"style":550},[670],{"type":547,"value":671}," signal",{"type":532,"tag":76,"props":673,"children":674},{"style":599},[675],{"type":547,"value":676}," - This image's lifetime. ",{"type":532,"tag":76,"props":678,"children":679},{"style":544},[680],{"type":547,"value":681},"@returns",{"type":532,"tag":76,"props":683,"children":684},{"style":599},[685],{"type":547,"value":686}," One browser resource lease. *\u002F\n",{"type":532,"tag":76,"props":688,"children":689},{"class":78,"line":189},[690,694,699,703,708,712,716],{"type":532,"tag":76,"props":691,"children":692},{"style":544},[693],{"type":547,"value":136},{"type":532,"tag":76,"props":695,"children":696},{"style":633},[697],{"type":547,"value":698}," resolve",{"type":532,"tag":76,"props":700,"children":701},{"style":550},[702],{"type":547,"value":142},{"type":532,"tag":76,"props":704,"children":706},{"style":705},"--shiki-default:#E36209;--shiki-light:#E36209;--shiki-dark:#FFAB70",[707],{"type":547,"value":152},{"type":532,"tag":76,"props":709,"children":710},{"style":550},[711],{"type":547,"value":155},{"type":532,"tag":76,"props":713,"children":714},{"style":705},[715],{"type":547,"value":163},{"type":532,"tag":76,"props":717,"children":718},{"style":550},[719],{"type":547,"value":720},") {\n",{"type":532,"tag":76,"props":722,"children":723},{"class":78,"line":215},[724,728,733,737,742,747,753,759,763,767,772,777,782,787,792,797,802],{"type":532,"tag":76,"props":725,"children":726},{"style":544},[727],{"type":547,"value":172},{"type":532,"tag":76,"props":729,"children":730},{"style":618},[731],{"type":547,"value":732}," match",{"type":532,"tag":76,"props":734,"children":735},{"style":544},[736],{"type":547,"value":127},{"type":532,"tag":76,"props":738,"children":739},{"style":560},[740],{"type":547,"value":741}," \u002F",{"type":532,"tag":76,"props":743,"children":744},{"style":544},[745],{"type":547,"value":746},"^",{"type":532,"tag":76,"props":748,"children":750},{"style":749},"--shiki-default:#22863A;--shiki-default-font-weight:bold;--shiki-light:#22863A;--shiki-light-font-weight:bold;--shiki-dark:#85E89D;--shiki-dark-font-weight:bold",[751],{"type":547,"value":752},"\\\u002F",{"type":532,"tag":76,"props":754,"children":756},{"style":755},"--shiki-default:#032F62;--shiki-light:#032F62;--shiki-dark:#DBEDFF",[757],{"type":547,"value":758},"assets",{"type":532,"tag":76,"props":760,"children":761},{"style":749},[762],{"type":547,"value":752},{"type":532,"tag":76,"props":764,"children":765},{"style":755},[766],{"type":547,"value":142},{"type":532,"tag":76,"props":768,"children":769},{"style":618},[770],{"type":547,"value":771},"[a-zA-Z0-9_-]",{"type":532,"tag":76,"props":773,"children":774},{"style":544},[775],{"type":547,"value":776},"+",{"type":532,"tag":76,"props":778,"children":779},{"style":755},[780],{"type":547,"value":781},")",{"type":532,"tag":76,"props":783,"children":784},{"style":544},[785],{"type":547,"value":786},"$",{"type":532,"tag":76,"props":788,"children":789},{"style":560},[790],{"type":547,"value":791},"\u002F",{"type":532,"tag":76,"props":793,"children":794},{"style":550},[795],{"type":547,"value":796},".",{"type":532,"tag":76,"props":798,"children":799},{"style":633},[800],{"type":547,"value":801},"exec",{"type":532,"tag":76,"props":803,"children":804},{"style":550},[805],{"type":547,"value":806},"(source);\n",{"type":532,"tag":76,"props":808,"children":809},{"class":78,"line":245},[810,814,818,822,827,831,835,839,843,848],{"type":532,"tag":76,"props":811,"children":812},{"style":544},[813],{"type":547,"value":248},{"type":532,"tag":76,"props":815,"children":816},{"style":550},[817],{"type":547,"value":251},{"type":532,"tag":76,"props":819,"children":820},{"style":544},[821],{"type":547,"value":254},{"type":532,"tag":76,"props":823,"children":824},{"style":550},[825],{"type":547,"value":826},"match) ",{"type":532,"tag":76,"props":828,"children":829},{"style":544},[830],{"type":547,"value":260},{"type":532,"tag":76,"props":832,"children":833},{"style":544},[834],{"type":547,"value":180},{"type":532,"tag":76,"props":836,"children":837},{"style":633},[838],{"type":547,"value":265},{"type":532,"tag":76,"props":840,"children":841},{"style":550},[842],{"type":547,"value":142},{"type":532,"tag":76,"props":844,"children":845},{"style":560},[846],{"type":547,"value":847},"\"unsupported-asset-reference\"",{"type":532,"tag":76,"props":849,"children":850},{"style":550},[851],{"type":547,"value":852},");\n",{"type":532,"tag":76,"props":854,"children":855},{"class":78,"line":275},[856,860,864,868,872,876,880,885,890,894,899,904,909,914,918,922,927,932,937],{"type":532,"tag":76,"props":857,"children":858},{"style":544},[859],{"type":547,"value":172},{"type":532,"tag":76,"props":861,"children":862},{"style":618},[863],{"type":547,"value":220},{"type":532,"tag":76,"props":865,"children":866},{"style":544},[867],{"type":547,"value":127},{"type":532,"tag":76,"props":869,"children":870},{"style":544},[871],{"type":547,"value":225},{"type":532,"tag":76,"props":873,"children":874},{"style":633},[875],{"type":547,"value":228},{"type":532,"tag":76,"props":877,"children":878},{"style":550},[879],{"type":547,"value":142},{"type":532,"tag":76,"props":881,"children":882},{"style":560},[883],{"type":547,"value":884},"`\u002Fapi\u002Fassets\u002F${",{"type":532,"tag":76,"props":886,"children":887},{"style":633},[888],{"type":547,"value":889},"encodeURIComponent",{"type":532,"tag":76,"props":891,"children":892},{"style":560},[893],{"type":547,"value":142},{"type":532,"tag":76,"props":895,"children":896},{"style":550},[897],{"type":547,"value":898},"match",{"type":532,"tag":76,"props":900,"children":901},{"style":560},[902],{"type":547,"value":903},"[",{"type":532,"tag":76,"props":905,"children":906},{"style":618},[907],{"type":547,"value":908},"1",{"type":532,"tag":76,"props":910,"children":911},{"style":560},[912],{"type":547,"value":913},"]",{"type":532,"tag":76,"props":915,"children":916},{"style":544},[917],{"type":547,"value":254},{"type":532,"tag":76,"props":919,"children":920},{"style":560},[921],{"type":547,"value":781},{"type":532,"tag":76,"props":923,"children":924},{"style":560},[925],{"type":547,"value":926},"}`",{"type":532,"tag":76,"props":928,"children":929},{"style":550},[930],{"type":547,"value":931},", { signal, credentials: ",{"type":532,"tag":76,"props":933,"children":934},{"style":560},[935],{"type":547,"value":936},"\"same-origin\"",{"type":532,"tag":76,"props":938,"children":939},{"style":550},[940],{"type":547,"value":941}," });\n",{"type":532,"tag":76,"props":943,"children":944},{"class":78,"line":299},[945,949,953,957,961,965,969,973,977,982,987,991,996,1000],{"type":532,"tag":76,"props":946,"children":947},{"style":544},[948],{"type":547,"value":248},{"type":532,"tag":76,"props":950,"children":951},{"style":550},[952],{"type":547,"value":251},{"type":532,"tag":76,"props":954,"children":955},{"style":544},[956],{"type":547,"value":254},{"type":532,"tag":76,"props":958,"children":959},{"style":550},[960],{"type":547,"value":257},{"type":532,"tag":76,"props":962,"children":963},{"style":544},[964],{"type":547,"value":260},{"type":532,"tag":76,"props":966,"children":967},{"style":544},[968],{"type":547,"value":180},{"type":532,"tag":76,"props":970,"children":971},{"style":633},[972],{"type":547,"value":265},{"type":532,"tag":76,"props":974,"children":975},{"style":550},[976],{"type":547,"value":142},{"type":532,"tag":76,"props":978,"children":979},{"style":560},[980],{"type":547,"value":981},"`asset-http-${",{"type":532,"tag":76,"props":983,"children":984},{"style":550},[985],{"type":547,"value":986},"response",{"type":532,"tag":76,"props":988,"children":989},{"style":560},[990],{"type":547,"value":796},{"type":532,"tag":76,"props":992,"children":993},{"style":550},[994],{"type":547,"value":995},"status",{"type":532,"tag":76,"props":997,"children":998},{"style":560},[999],{"type":547,"value":926},{"type":532,"tag":76,"props":1001,"children":1002},{"style":550},[1003],{"type":547,"value":852},{"type":532,"tag":76,"props":1005,"children":1006},{"class":78,"line":305},[1007,1011,1016,1020,1024,1028,1033],{"type":532,"tag":76,"props":1008,"children":1009},{"style":544},[1010],{"type":547,"value":172},{"type":532,"tag":76,"props":1012,"children":1013},{"style":618},[1014],{"type":547,"value":1015}," blob",{"type":532,"tag":76,"props":1017,"children":1018},{"style":544},[1019],{"type":547,"value":127},{"type":532,"tag":76,"props":1021,"children":1022},{"style":544},[1023],{"type":547,"value":225},{"type":532,"tag":76,"props":1025,"children":1026},{"style":550},[1027],{"type":547,"value":286},{"type":532,"tag":76,"props":1029,"children":1030},{"style":633},[1031],{"type":547,"value":1032},"blob",{"type":532,"tag":76,"props":1034,"children":1035},{"style":550},[1036],{"type":547,"value":1037},"();\n",{"type":532,"tag":76,"props":1039,"children":1040},{"class":78,"line":311},[1041,1045,1049,1053,1057,1061,1066,1070,1075,1080,1085,1089,1094,1098,1103,1107,1111,1115,1120,1125,1130,1135,1140,1145,1150,1154,1158,1162,1166,1171],{"type":532,"tag":76,"props":1042,"children":1043},{"style":544},[1044],{"type":547,"value":248},{"type":532,"tag":76,"props":1046,"children":1047},{"style":550},[1048],{"type":547,"value":251},{"type":532,"tag":76,"props":1050,"children":1051},{"style":544},[1052],{"type":547,"value":254},{"type":532,"tag":76,"props":1054,"children":1055},{"style":560},[1056],{"type":547,"value":791},{"type":532,"tag":76,"props":1058,"children":1059},{"style":544},[1060],{"type":547,"value":746},{"type":532,"tag":76,"props":1062,"children":1063},{"style":755},[1064],{"type":547,"value":1065},"image",{"type":532,"tag":76,"props":1067,"children":1068},{"style":749},[1069],{"type":547,"value":752},{"type":532,"tag":76,"props":1071,"children":1072},{"style":755},[1073],{"type":547,"value":1074},"(png",{"type":532,"tag":76,"props":1076,"children":1077},{"style":544},[1078],{"type":547,"value":1079},"|",{"type":532,"tag":76,"props":1081,"children":1082},{"style":755},[1083],{"type":547,"value":1084},"jpeg",{"type":532,"tag":76,"props":1086,"children":1087},{"style":544},[1088],{"type":547,"value":1079},{"type":532,"tag":76,"props":1090,"children":1091},{"style":755},[1092],{"type":547,"value":1093},"webp",{"type":532,"tag":76,"props":1095,"children":1096},{"style":544},[1097],{"type":547,"value":1079},{"type":532,"tag":76,"props":1099,"children":1100},{"style":755},[1101],{"type":547,"value":1102},"gif)",{"type":532,"tag":76,"props":1104,"children":1105},{"style":544},[1106],{"type":547,"value":786},{"type":532,"tag":76,"props":1108,"children":1109},{"style":560},[1110],{"type":547,"value":791},{"type":532,"tag":76,"props":1112,"children":1113},{"style":550},[1114],{"type":547,"value":796},{"type":532,"tag":76,"props":1116,"children":1117},{"style":633},[1118],{"type":547,"value":1119},"test",{"type":532,"tag":76,"props":1121,"children":1122},{"style":550},[1123],{"type":547,"value":1124},"(blob.type) ",{"type":532,"tag":76,"props":1126,"children":1127},{"style":544},[1128],{"type":547,"value":1129},"||",{"type":532,"tag":76,"props":1131,"children":1132},{"style":550},[1133],{"type":547,"value":1134}," blob.size ",{"type":532,"tag":76,"props":1136,"children":1137},{"style":544},[1138],{"type":547,"value":1139},">",{"type":532,"tag":76,"props":1141,"children":1142},{"style":618},[1143],{"type":547,"value":1144}," 5_000_000",{"type":532,"tag":76,"props":1146,"children":1147},{"style":550},[1148],{"type":547,"value":1149},") ",{"type":532,"tag":76,"props":1151,"children":1152},{"style":544},[1153],{"type":547,"value":260},{"type":532,"tag":76,"props":1155,"children":1156},{"style":544},[1157],{"type":547,"value":180},{"type":532,"tag":76,"props":1159,"children":1160},{"style":633},[1161],{"type":547,"value":265},{"type":532,"tag":76,"props":1163,"children":1164},{"style":550},[1165],{"type":547,"value":142},{"type":532,"tag":76,"props":1167,"children":1168},{"style":560},[1169],{"type":547,"value":1170},"\"unsupported-image\"",{"type":532,"tag":76,"props":1172,"children":1173},{"style":550},[1174],{"type":547,"value":852},{"type":532,"tag":76,"props":1176,"children":1177},{"class":78,"line":316},[1178,1182,1187,1191,1196,1200,1205],{"type":532,"tag":76,"props":1179,"children":1180},{"style":544},[1181],{"type":547,"value":172},{"type":532,"tag":76,"props":1183,"children":1184},{"style":618},[1185],{"type":547,"value":1186}," url",{"type":532,"tag":76,"props":1188,"children":1189},{"style":544},[1190],{"type":547,"value":127},{"type":532,"tag":76,"props":1192,"children":1193},{"style":618},[1194],{"type":547,"value":1195}," URL",{"type":532,"tag":76,"props":1197,"children":1198},{"style":550},[1199],{"type":547,"value":796},{"type":532,"tag":76,"props":1201,"children":1202},{"style":633},[1203],{"type":547,"value":1204},"createObjectURL",{"type":532,"tag":76,"props":1206,"children":1207},{"style":550},[1208],{"type":547,"value":1209},"(blob);\n",{"type":532,"tag":76,"props":1211,"children":1213},{"class":78,"line":1212},14,[1214,1218,1223,1228,1233,1238,1242,1247],{"type":532,"tag":76,"props":1215,"children":1216},{"style":544},[1217],{"type":547,"value":278},{"type":532,"tag":76,"props":1219,"children":1220},{"style":550},[1221],{"type":547,"value":1222}," { url, ",{"type":532,"tag":76,"props":1224,"children":1225},{"style":633},[1226],{"type":547,"value":1227},"release",{"type":532,"tag":76,"props":1229,"children":1230},{"style":550},[1231],{"type":547,"value":1232},"() { ",{"type":532,"tag":76,"props":1234,"children":1235},{"style":618},[1236],{"type":547,"value":1237},"URL",{"type":532,"tag":76,"props":1239,"children":1240},{"style":550},[1241],{"type":547,"value":796},{"type":532,"tag":76,"props":1243,"children":1244},{"style":633},[1245],{"type":547,"value":1246},"revokeObjectURL",{"type":532,"tag":76,"props":1248,"children":1249},{"style":550},[1250],{"type":547,"value":1251},"(url); } };\n",{"type":532,"tag":76,"props":1253,"children":1255},{"class":78,"line":1254},15,[1256],{"type":532,"tag":76,"props":1257,"children":1258},{"style":550},[1259],{"type":547,"value":302},{"type":532,"tag":76,"props":1261,"children":1263},{"class":78,"line":1262},16,[1264],{"type":532,"tag":76,"props":1265,"children":1266},{"style":550},[1267],{"type":547,"value":1268},"});\n",{"type":532,"tag":76,"props":1270,"children":1272},{"class":78,"line":1271},17,[1273],{"type":532,"tag":76,"props":1274,"children":1275},{"style":599},[1276],{"type":547,"value":1277},"\u002F** Replace the preset's image owner; the host must implement GET \u002Fapi\u002Fassets\u002F:id. *\u002F\n",{"type":532,"tag":76,"props":1279,"children":1281},{"class":78,"line":1280},18,[1282,1286,1290,1295,1299,1304,1308],{"type":532,"tag":76,"props":1283,"children":1284},{"style":544},[1285],{"type":547,"value":610},{"type":532,"tag":76,"props":1287,"children":1288},{"style":544},[1289],{"type":547,"value":615},{"type":532,"tag":76,"props":1291,"children":1292},{"style":618},[1293],{"type":547,"value":1294}," privateImageKit",{"type":532,"tag":76,"props":1296,"children":1297},{"style":544},[1298],{"type":547,"value":127},{"type":532,"tag":76,"props":1300,"children":1301},{"style":550},[1302],{"type":547,"value":1303}," StarterKit.",{"type":532,"tag":76,"props":1305,"children":1306},{"style":633},[1307],{"type":547,"value":322},{"type":532,"tag":76,"props":1309,"children":1310},{"style":550},[1311],{"type":547,"value":1312},"({ image: PrivateImages });\n",{"type":532,"tag":501,"props":1314,"children":1315},{},[1316],{"type":547,"value":1317},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",1793046311421]